File tree Expand file tree Collapse file tree 5 files changed +13
-23
lines changed Expand file tree Collapse file tree 5 files changed +13
-23
lines changed Original file line number Diff line number Diff line change
1
+ * text =auto
Original file line number Diff line number Diff line change @@ -31,6 +31,6 @@ module.exports = (paths) => {
31
31
path : paths . dist ( ) ,
32
32
publicPath : '/'
33
33
} ,
34
- performance : env . config . performance
34
+ performance : envConfig . performance
35
35
} ;
36
36
} ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ const ExtractTextPlugin = require('extract-text-webpack-plugin');
4
4
5
5
const isDev = env . isDev ;
6
6
module . exports = ( ) => {
7
- const loaders = [ {
7
+ const loaderArray = [ {
8
8
test : / \. ( j s | j s x ) $ / ,
9
9
exclude : / n o d e _ m o d u l e s / ,
10
10
loader : 'babel-loader'
@@ -41,12 +41,13 @@ module.exports = () => {
41
41
} ] ;
42
42
if ( ! isDev ) {
43
43
debug ( 'Apply ExtractTextPlugin to CSS loaders.(非开发环境应用ExtractTextPluginLoaders到css loaders)' ) ;
44
- loaders . filter ( loader => loader . loaders && loader . loaders . find ( name => / c s s / . test ( name . split ( '?' ) [ 0 ] ) ) ) . forEach ( ( loader ) => {
45
- const first = loader . loaders [ 0 ] ;
46
- const rest = loader . loaders . slice ( 1 ) ;
47
- loader . loader = ExtractTextPlugin . extract ( { fallbackLoader : first , loader : rest . join ( '!' ) } ) ;
48
- delete loader . loaders ;
49
- } ) ;
44
+ loaderArray . filter ( loaderObj => loaderObj . loaders && loaderObj . loaders . find ( name => / c s s / . test ( name . split ( '?' ) [ 0 ] ) ) )
45
+ . forEach ( ( loaderObj ) => {
46
+ const first = loaderObj . loaders [ 0 ] ; // except style-loader
47
+ const rest = loaderObj . loaders . slice ( 1 ) ;
48
+ loaderObj . loader = ExtractTextPlugin . extract ( { fallbackLoader : first , loader : rest . join ( '!' ) } ) ;
49
+ delete loaderObj . loaders ;
50
+ } ) ;
50
51
}
51
- return loaders ;
52
+ return loaderArray ;
52
53
} ;
Original file line number Diff line number Diff line change 25
25
}
26
26
},
27
27
"compile" : {
28
- "command" : " rimraf dist/* && npm run lint && node bin/compile" ,
28
+ "command" : " rimraf dist/* && npm run lint:fix && node bin/compile" ,
29
29
"env" : {
30
30
"DEBUG" : " app:*:compile*" ,
31
31
"NODE_ENV" : " production"
Original file line number Diff line number Diff line change @@ -28,21 +28,9 @@ export default (initialState = {}) => {
28
28
) , { location }
29
29
) ;
30
30
browserHistory . listen ( updateLocation ( store ) ) ;
31
+
31
32
// inject global reducers
32
33
store . injectAll ( globalReducerMaps ) ;
33
34
34
- // store.asyncReducers = {};
35
-
36
- // // Anywhere, you can call store.unsubscribeHistory() to cancel subscribe;
37
- // store.unsubscribeHistory = browserHistory.listen(updateLocation(store));
38
-
39
- // // Make reducers hot reloadable, see http://mxs.is/googmo
40
- // if (module.hot) {
41
- // module.hot.accept('../utils/reducerTool', () => {
42
- // const makeReducer = require('../utils/reducerTool').default;
43
- // store.replaceReducer(makeReducer(store.asyncReducers));
44
- // });
45
- // }
46
-
47
35
return store ;
48
36
} ;
You can’t perform that action at this time.
0 commit comments