Skip to content

Commit d33929d

Browse files
committed
fixed webpack-filepaths, so relative paths are generated
1 parent a6785c6 commit d33929d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

webpack.config.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ module.exports = {
88
},
99
output: {
1010
filename: 'bundle.js',
11-
path: path.resolve('app'),
12-
publicPath: path.resolve('app')
11+
path: path.resolve(__dirname, 'app'),
12+
publicPath: ""
1313
},
1414
resolve: {
1515
alias: {
16-
Utilities: path.resolve(__dirname, 'ui/js/')
16+
Utilities: path.resolve('ui/js/')
1717
},
1818
extensions: ['.js', '.json', '.jsx']
1919
},
@@ -43,11 +43,11 @@ module.exports = {
4343
options: {
4444
name: loader_path => {
4545
if(!/node_modules/.test(loader_path)) {
46-
return "app/images/[name].[ext]?[hash]";
46+
return "/images/[name].[ext]?[hash]";
4747
}
4848

4949
return (
50-
"app/images/vendor/" +
50+
"/images/vendor/" +
5151
loader_path.replace(/\\/g, "/")
5252
.replace(/((.*(node_modules))|images|image|img|assets)\//g, '') +
5353
'?[hash]'
@@ -65,11 +65,11 @@ module.exports = {
6565
options: {
6666
name: loader_path => {
6767
if (!/node_modules/.test(loader_path)) {
68-
return 'app/fonts/[name].[ext]?[hash]';
68+
return '/fonts/[name].[ext]?[hash]';
6969
}
7070

7171
return (
72-
'app/fonts/vendor/' +
72+
'/fonts/vendor/' +
7373
loader_path
7474
.replace(/\\/g, '/')
7575
.replace(/((.*(node_modules))|fonts|font|assets)\//g, '') +

0 commit comments

Comments
 (0)