Blank App after Build (Dev run perfectly)
npm run pack:renderer
show
ERROR in renderer.js from UglifyJs
Unexpected token: name (ServerDB) [renderer.js:420,6]
I think there is a similar problem http://stackoverflow.com/questions/43598037/error-in-renderer-js-from-uglifyjs-unexpected-token-punc
#
#
#
This might be an off-shoot answer but IME unexpected token errors usually mean I forgot to tell Babel to transpile a module so UglifyJS gets the unprocessed source with all the new JS features and it doesn't know how to handle; hence the error.
So my bet would be on the babel-loaders configuration. eg...
{
test: /\.js$/,
use: 'babel-loader',
include: [path.resolve(__dirname, 'app/src'), // make src the root of transpiling, so if your problematic code is under anywhere in src/ Babel will pick it up.
//path.resolve(__dirname, 'app/src/renderer') // this is the original line which cages Babel within the renderer/ folder.
],
exclude: /node_modules/
},
Yes that nailed it. This path.resolve(__dirname, 'app/src') was indeed the missing part: <3
I knew I wasn't the only one bitten by this :)
@SimulatedGREG maybe "app/src" should be the default. Because when you add a new module to your project you choose the src/ folder by instinct. It just seems right until NPM shits errors on you.
Thanks for the find @utkukaratas. I'll most likely make this adjustment in the next milestone.
Fix has been pushed the dev branch. Check #171 for more info on final release.
Most helpful comment
This might be an off-shoot answer but IME unexpected token errors usually mean I forgot to tell Babel to transpile a module so UglifyJS gets the unprocessed source with all the new JS features and it doesn't know how to handle; hence the error.
So my bet would be on the babel-loaders configuration. eg...