@@ -8,7 +8,7 @@ const fs = require('fs-extra'),
88 packageJson = JSON . parse ( fs . readFileSync ( path . resolve ( processRoot , 'package.json' ) , 'utf8' ) ) ,
99 neoPath = packageJson . name === 'neo.mjs' ? './' : './node_modules/neo.mjs/' ,
1010 config = JSON . parse ( fs . readFileSync ( path . resolve ( neoPath , 'buildScripts/webpack/production/build.json' ) ) , 'utf8' ) ,
11- entry = { main : path . resolve ( neoPath , config . mainInput ) } ,
11+ entry = { } ,
1212 plugins = [ ] ;
1313
1414let basePath , i , treeLevel , workerBasePath ;
@@ -62,7 +62,7 @@ module.exports = {
6262
6363 plugins : [
6464 new CleanWebpackPlugin ( {
65- cleanOnceBeforeBuildPatterns : [ '**/*.js' , '**/*.mjs' , '!apps/**/*.js' , '!**/*highlight.pack.js' ] ,
65+ cleanOnceBeforeBuildPatterns : [ '**/*.js' , '**/*.mjs' , '!apps/**/*.js' , '!**/*highlight.pack.js' , '!main.js' ] ,
6666 root : path . resolve ( processRoot , config . buildFolder ) ,
6767 verbose : true
6868 } ) ,
@@ -76,9 +76,7 @@ module.exports = {
7676 filename : ( chunkData ) => {
7777 let name = chunkData . chunk . name ;
7878
79- if ( name === 'main' ) {
80- return config . mainOutput ;
81- } else if ( config . workers . hasOwnProperty ( name ) ) {
79+ if ( config . workers . hasOwnProperty ( name ) ) {
8280 return config . workers [ name ] . output ;
8381 } else if ( config . examples . hasOwnProperty ( name ) ) {
8482 return config . examples [ name ] . output + 'app.js' ;
0 commit comments