1
- const path = require ( ' path' )
2
- const HtmlWebpackPlugin = require ( ' html-webpack-plugin' )
3
- const CopyPlugin = require ( ' copy-webpack-plugin' )
1
+ const path = require ( " path" ) ;
2
+ const HtmlWebpackPlugin = require ( " html-webpack-plugin" ) ;
3
+ const CopyPlugin = require ( " copy-webpack-plugin" ) ;
4
4
5
5
module . exports = {
6
- entry : './app /index.js' ,
6
+ entry : "./src /index.js" ,
7
7
output : {
8
- path : path . resolve ( __dirname , ' dist' ) ,
9
- filename : ' index_bundle.js' ,
10
- publicPath : '/'
8
+ path : path . resolve ( __dirname , " dist" ) ,
9
+ filename : " index_bundle.js" ,
10
+ publicPath : "/" ,
11
11
} ,
12
12
module : {
13
13
rules : [
14
- { test : / \. ( j s ) $ / , use : ' babel-loader' } ,
15
- { test : / \. c s s $ / , use : [ ' style-loader' , ' css-loader' ] }
16
- ]
14
+ { test : / \. ( j s ) $ / , use : " babel-loader" } ,
15
+ { test : / \. c s s $ / , use : [ " style-loader" , " css-loader" ] } ,
16
+ ] ,
17
17
} ,
18
- mode : process . env . NODE_ENV === ' production' ? ' production' : ' development' ,
18
+ mode : process . env . NODE_ENV === " production" ? " production" : " development" ,
19
19
plugins : [
20
20
new HtmlWebpackPlugin ( {
21
- template : 'app/ index.html'
21
+ template : "./public/ index.html" ,
22
22
} ) ,
23
23
new CopyPlugin ( {
24
- patterns : [
25
- { from : '_redirects' }
26
- ]
27
- } )
24
+ patterns : [ { from : "./public/_redirects" } ] ,
25
+ } ) ,
28
26
] ,
29
27
devServer : {
30
- historyApiFallback : true
31
- }
32
- }
28
+ historyApiFallback : true ,
29
+ } ,
30
+ } ;
0 commit comments