-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathwebpack.config.js
29 lines (27 loc) · 1.02 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const path = require('path');
const webpack = require('webpack');
module.exports = env => {
const webpackVariables = {
mode: env.production ? "production" : "development",
forceDevelopmentEnv: true
}
return {
mode: env.production ? "production" : "development",
entry: {
script: path.resolve(__dirname, './src/script.js'),
mock: path.resolve(__dirname, './src/mock.js'),
themeEditor: path.resolve(__dirname, './src/themeEditor.js'),
welcome: path.resolve(__dirname, './src/welcome.js'), // add this
liveTileHelper: path.resolve(__dirname, './src/scripts/liveTileHelper.js'), // add this
},
output: {
path: path.resolve(__dirname, './www/dist/'),
filename: '[name].js', // output filename based on entry point name
},
externals: {
'webpackVariables': `${JSON.stringify(webpackVariables)}`,
},
}
};
//set if (webpackVariables.mode == "devFelopment" && false) { to if (webpackVariables.mode == "development") {
//disable forceSetupTest