@@ -22,19 +22,6 @@ const eslintFormatter = require('react-dev-utils/eslintFormatter');
22
22
const ModuleScopePlugin = require ( 'react-dev-utils/ModuleScopePlugin' ) ;
23
23
const paths = require ( './paths' ) ;
24
24
const getClientEnvironment = require ( './env' ) ;
25
- var autoprefixer = require ( 'autoprefixer' ) ;
26
- var webpack = require ( 'webpack' ) ;
27
- var HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
28
- var ExtractTextPlugin = require ( 'extract-text-webpack-plugin' ) ;
29
- var ManifestPlugin = require ( 'webpack-manifest-plugin' ) ;
30
- var InterpolateHtmlPlugin = require ( 'react-dev-utils/InterpolateHtmlPlugin' ) ;
31
- var paths = require ( './paths' ) ;
32
- var getClientEnvironment = require ( './env' ) ;
33
-
34
- // @remove -on-eject-begin
35
- // `path` is not used after eject - see https://github.com/facebookincubator/create-react-app/issues/1174
36
- var path = require ( 'path' ) ;
37
- // @remove -on-eject-end
38
25
39
26
// Webpack uses `publicPath` to determine where the app is being served from.
40
27
// It requires a trailing slash, or the file assets will get an incorrect path.
@@ -56,7 +43,7 @@ if (env.stringified['process.env'].NODE_ENV !== '"production"') {
56
43
}
57
44
58
45
// Note: defined here because it will be used more than once.
59
- const cssFilename = 'static/ css/[name].[contenthash:8].css' ;
46
+ const cssFilename = 'css/[name].[contenthash:8].css' ;
60
47
61
48
// ExtractTextPlugin expects the build output to be flat.
62
49
// (See https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/27)
@@ -84,7 +71,7 @@ module.exports = {
84
71
// Generated JS file names (with nested folders).
85
72
// There will be one main bundle, and one file per asynchronous chunk.
86
73
// We don't currently advertise code splitting but Webpack supports it.
87
- filename : 'static/ js/[name].[chunkhash:8].js' ,
74
+ filename : 'js/[name].[chunkhash:8].js' ,
88
75
chunkFilename : 'static/js/[name].[chunkhash:8].chunk.js' ,
89
76
// We inferred the "public path" (such as / or /my-project) from homepage.
90
77
publicPath : publicPath ,
@@ -181,7 +168,7 @@ module.exports = {
181
168
] ,
182
169
loader : require . resolve ( 'file-loader' ) ,
183
170
options : {
184
- name : 'static/ media/[name].[hash:8].[ext]' ,
171
+ name : 'media/[name].[hash:8].[ext]' ,
185
172
} ,
186
173
} ,
187
174
// "url" loader works just like "file" loader but it also embeds
@@ -191,7 +178,7 @@ module.exports = {
191
178
loader : require . resolve ( 'url-loader' ) ,
192
179
options : {
193
180
limit : 10000 ,
194
- name : 'static/ media/[name].[hash:8].[ext]' ,
181
+ name : 'media/[name].[hash:8].[ext]' ,
195
182
} ,
196
183
} ,
197
184
// Process JS with Babel.
@@ -273,6 +260,7 @@ module.exports = {
273
260
new HtmlWebpackPlugin ( {
274
261
inject : true ,
275
262
template : paths . appHtml ,
263
+ filename : '../templates/index.html' ,
276
264
minify : {
277
265
removeComments : true ,
278
266
collapseWhitespace : true ,
0 commit comments