Created
February 19, 2018 11:50
-
-
Save eseQ/9c26cf0c606aa25ae53583dc634d9d83 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// apps/other/client/webpack/webpack.base.config.js | |
const Config = require('webpack-config').default; | |
const environment = require('webpack-config').environment; | |
const path = require('path'); | |
const key = environment.valueOf('projectKey'); | |
const main = environment.valueOf(key); | |
module.exports = new Config().merge({ | |
entry: { | |
main : `${main.appPath}/startup/App`, | |
}, | |
output: { | |
filename : main.outputFilename, | |
chunkFilename: main.outputChunkFilename, | |
path : path.resolve(main.dirname, main.outputPath), | |
publicPath : main.outputPublicPath, | |
}, | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// apps/main/client/webpack.config.js | |
const Config = require('webpack-config').default; | |
const environment = require('webpack-config').environment; | |
const data = { | |
env, | |
isProd, | |
projectKey : env.projectKey || 'sub', | |
webpackConfigs: '../../other/client/webpack', | |
main : { | |
dirname: __dirname, | |
packages, | |
appPath, /* string */ | |
}, | |
}; | |
environment.setAll(data); | |
const config = new Config().extend('[webpackConfigs]/webpack.base.config.js'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment