Skip to content

Commit 1a1d398

Browse files
Adjust build to relative paths
1 parent 1aa821f commit 1a1d398

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

internals/webpack/webpack.base.babel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = (options) => ({
99
entry: options.entry,
1010
output: Object.assign({ // Compile into js/build.js
1111
path: path.resolve(process.cwd(), 'build'),
12-
publicPath: '/',
12+
publicPath: './',
1313
}, options.output), // Merge with env dependent settings
1414
module: {
1515
loaders: [{

internals/webpack/webpack.prod.babel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ module.exports = require('./webpack.base.babel')({
4545
// Put it in the end to capture all the HtmlWebpackPlugin's
4646
// assets manipulations and do leak its manipulations to HtmlWebpackPlugin
4747
new OfflinePlugin({
48-
relativePaths: false,
48+
relativePaths: true,
4949
publicPath: '/',
5050

5151
// No need to cache .htaccess. See http://mxs.is/googmp,

package.json

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"postinstall": "npm run build:dll",
2323
"prebuild": "npm run build:clean",
2424
"build": "cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress",
25-
"build:clean": "npm run test:clean && rimraf ./docs",
25+
"build:clean": "npm run test:clean && rimraf ./build",
2626
"build:dll": "node ./internals/scripts/dependencies.js",
2727
"start": "cross-env NODE_ENV=development node server",
2828
"start:tunnel": "cross-env NODE_ENV=development ENABLE_TUNNEL=true node server",
@@ -53,14 +53,12 @@
5353
"output": "dist",
5454
"buildResources": "buildresources"
5555
},
56-
"extraFiles": [
57-
{
58-
"from": "build",
59-
"filter": [
60-
"**/*"
61-
]
62-
}
63-
],
56+
"extraFiles": [{
57+
"from": "build",
58+
"filter": [
59+
"**/*"
60+
]
61+
}],
6462
"mac": {
6563
"category": "usability"
6664
}
@@ -72,8 +70,7 @@
7270
"babel": {
7371
"presets": [
7472
[
75-
"latest",
76-
{
73+
"latest", {
7774
"es2015": {
7875
"modules": false
7976
}
@@ -144,8 +141,7 @@
144141
"import/prefer-default-export": 0,
145142
"indent": [
146143
2,
147-
2,
148-
{
144+
2, {
149145
"SwitchCase": 1
150146
}
151147
],

0 commit comments

Comments
 (0)