File tree 5 files changed +47
-10
lines changed
5 files changed +47
-10
lines changed Original file line number Diff line number Diff line change 6
6
"license" : " " ,
7
7
"author" : " " ,
8
8
"scripts" : {
9
- "build" : " parcel build index.html" ,
10
- "dev" : " parcel index.html --open" ,
11
- "start" : " npm run build && npm run dev" ,
12
- "test" : " echo \" Error: no test specified\" && exit 1"
9
+ "test" : " echo \" Error: no test specified\" && exit 1" ,
10
+ "start" : " webpack-dev-server --open --port 8080"
11
+ },
12
+ "dependencies" : {
13
+ "webpack" : " ^4.36.1"
13
14
},
14
15
"devDependencies" : {
15
- "parcel-bundler" : " ^1.12.5"
16
+ "html-webpack-plugin" : " ^3.2.0" ,
17
+ "webpack-cli" : " ^3.3.6" ,
18
+ "webpack-dev-server" : " ^3.7.2"
16
19
}
17
20
}
Original file line number Diff line number Diff line change
1
+ const HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
2
+ module . exports = {
3
+ entry : "./js/main.js" ,
4
+ devServer : {
5
+ liveReload : true ,
6
+ watchContentBase : true ,
7
+ inline : true ,
8
+ hot : true ,
9
+ } ,
10
+ plugins : [
11
+ new HtmlWebpackPlugin ( {
12
+ template : './index.html'
13
+ } )
14
+ ]
15
+ } ;
Original file line number Diff line number Diff line change 6
6
"license" : " " ,
7
7
"author" : " " ,
8
8
"scripts" : {
9
- "build" : " parcel build index.html" ,
10
- "dev" : " parcel index.html --open" ,
11
- "start" : " npm run build && npm run dev" ,
12
- "test" : " echo \" Error: no test specified\" && exit 1"
9
+ "test" : " echo \" Error: no test specified\" && exit 1" ,
10
+ "start" : " webpack-dev-server --open --port 8080"
11
+ },
12
+ "dependencies" : {
13
+ "webpack" : " ^4.36.1"
13
14
},
14
15
"devDependencies" : {
15
- "parcel-bundler" : " ^1.12.5"
16
+ "html-webpack-plugin" : " ^3.2.0" ,
17
+ "webpack-cli" : " ^3.3.6" ,
18
+ "webpack-dev-server" : " ^3.7.2"
16
19
}
17
20
}
Original file line number Diff line number Diff line change
1
+ const HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
2
+ module . exports = {
3
+ entry : "./js/main.js" ,
4
+ devServer : {
5
+ liveReload : true ,
6
+ watchContentBase : true ,
7
+ inline : true ,
8
+ hot : true ,
9
+ } ,
10
+ plugins : [
11
+ new HtmlWebpackPlugin ( {
12
+ template : './index.html'
13
+ } )
14
+ ]
15
+ } ;
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ const expectedFilesInDistDir = [
20
20
'404.html' ,
21
21
'package.json' ,
22
22
'browserconfig.xml' ,
23
+ 'webpack.config.js' ,
23
24
24
25
'css/' , // for directories, a `/` character
25
26
// should be included at the end
You can’t perform that action at this time.
0 commit comments