This repository was archived by the owner on May 8, 2018. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import path from 'path'
22import fs from 'fs'
33import webpack from 'webpack'
44import config from '../config'
5- import isomorphicWebpackConfig from '../webpack. isomorphic'
5+ import isomorphicWebpackConfig from '../isomorphic.config '
66import childProcess from 'child_process'
77
88// Cleare dist dir before run
@@ -11,6 +11,7 @@ exec(`rm -rf ${config.distPath}/server`)
1111
1212const definePluginArgs = {
1313 'process.env.BROWSER' : JSON . stringify ( false ) ,
14+ 'process.env.NODE_ENV' : JSON . stringify ( config . NODE_ENV ) ,
1415 'process.env.CLIENT_DIST_PATH' : JSON . stringify ( config . CLIENT_DIST_PATH )
1516}
1617
@@ -46,9 +47,12 @@ const baseWebpackConfig = {
4647 extensions : isomorphicWebpackConfig . resolve . extensions ,
4748 modules : isomorphicWebpackConfig . resolve . modules ,
4849 alias : {
49- 'webpack-assets' : `${ CLIENT_DIST_PATH } /webpack-assets.json`
50+ 'webpack-assets' : `${ config . CLIENT_DIST_PATH } /webpack-assets.json`
5051 }
5152 } ,
53+ module : {
54+ rules : isomorphicWebpackConfig . module . rules
55+ } ,
5256 plugins : isomorphicWebpackConfig . plugins . concat ( [
5357 new webpack . DefinePlugin ( definePluginArgs )
5458 ] ) ,
Original file line number Diff line number Diff line change 1+ import baseWebpackConfig from './webpack.base.babel'
2+
3+ export default baseWebpackConfig
Original file line number Diff line number Diff line change 1+ import baseWebpackConfig from './webpack.base.babel'
2+
3+ export default baseWebpackConfig
You can’t perform that action at this time.
0 commit comments