Skip to content

Commit b920132

Browse files
author
Paulo Rezende
committed
Create a vendor entry and optimizes some paths
1 parent d1b11e3 commit b920132

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

webpack/webpack.common.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ const path = require('path');
33

44
module.exports = {
55
entry: {
6-
app: './statik/scripts/app.js'
6+
vendor: path.resolve('statik', 'scripts', 'vendor.js'),
7+
app: path.resolve('statik', 'scripts', 'app.js')
78
},
89
output: {
910
filename: '[name].bundle.js',
10-
path: path.join(__dirname, '../build/public')
11+
path: path.resolve('build', 'public')
1112
},
1213
module: {
1314
rules: [
@@ -48,5 +49,5 @@ module.exports = {
4849
}
4950
]
5051
},
51-
plugins: [new CleanWebpackPlugin(['./build/public'])]
52+
plugins: [new CleanWebpackPlugin([path.resolve('build', 'public')])]
5253
};

0 commit comments

Comments
 (0)