Skip to content

Commit dc42ade

Browse files
committed
#523 adjusted the prod build
1 parent 19fb457 commit dc42ade

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

buildScripts/webpack/development/webpack.config.myapps.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,15 @@ module.exports = env => {
8989

9090
if (!fs.existsSync(indexPath)) {
9191
plugins.push(new HtmlWebpackPlugin({
92-
chunks : ['main'],
92+
chunks : [],
9393
filename: indexPath,
9494
template: value.indexPath ? path.resolve(processRoot, value.indexPath) : path.resolve(neoPath, 'buildScripts/webpack/index.ejs'),
9595
templateParameters: {
9696
appPath : value.output + 'app.js',
9797
bodyTag : value.bodyTag || config.bodyTag,
9898
basePath,
9999
environment : 'development',
100+
mainPath : workerBasePath + 'main.js',
100101
themes : value.themes || "'neo-theme-light', 'neo-theme-dark'", // arrays are not supported as templateParameters
101102
title : value.title,
102103
useAmCharts : value.hasOwnProperty('useAmCharts') ? value.useAmCharts : false,

buildScripts/webpack/production/webpack.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,15 @@ if (config.examples) {
3636
}
3737

3838
plugins.push(new HtmlWebpackPlugin({
39-
chunks : ['main'],
39+
chunks : [],
4040
filename: path.resolve(processRoot, config.buildFolder) + value.output + 'index.html',
4141
template: path.resolve(neoPath, value.indexPath || 'buildScripts/webpack/index.ejs'),
4242
templateParameters: {
4343
appPath : value.output + 'app.js',
4444
bodyTag : value.bodyTag || config.bodyTag,
4545
basePath,
4646
environment : config.environment,
47+
mainPath : workerBasePath + 'main.js',
4748
themes : value.themes || "'neo-theme-light', 'neo-theme-dark'", // arrays are not supported as templateParameters
4849
title : value.title,
4950
useAmCharts : value.hasOwnProperty('useAmCharts') ? value.useAmCharts : false,

buildScripts/webpack/production/webpack.config.myapps.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,15 @@ module.exports = env => {
8989

9090
if (!fs.existsSync(indexPath)) {
9191
plugins.push(new HtmlWebpackPlugin({
92-
chunks : ['main'],
92+
chunks : [],
9393
filename: indexPath,
9494
template: value.indexPath ? path.resolve(processRoot, value.indexPath) : path.resolve(neoPath, 'buildScripts/webpack/index.ejs'),
9595
templateParameters: {
9696
appPath : value.output + 'app.js',
9797
bodyTag : value.bodyTag || config.bodyTag,
9898
basePath,
9999
environment : 'production',
100+
mainPath : workerBasePath + 'main.js',
100101
themes : value.themes || "'neo-theme-light', 'neo-theme-dark'", // arrays are not supported as templateParameters
101102
title : value.title,
102103
useAmCharts : value.hasOwnProperty('useAmCharts') ? value.useAmCharts : false,

0 commit comments

Comments
 (0)