3.0.0
Node 8.11.2 / yarn 1.9.4 / Ubuntu 16.04
I want to build multi-page app, but I have no need for default app entry point.
So I'm trying to find a way to remove default entrypoint in vue.config.js.
I found that webpack-chain does not support removing entries, only clearing entry files from entry.
So I tried pages configuration to overwrite app to point to files that make sense in my environment.
I expect to be able to remove default entrypoint or at least I expect pages definition to overwrite default entrypoint.
module.exports = {
pages: {
app: {
entry: 'src/paymentInitiation/paymentInitiation.ts',
template: 'public/index.html',
title: 'Payment Initiation',
filename: 'paymentInitiation.html'
},
example: {
entry: 'src/example/main.ts',
template: 'public/index.html',
title: 'Example Vue Page',
filename: 'example.html'
}
}
}
Inspect output:
...
entry: {
app: [
'./src/main.ts'
],
example: [
'/home/.../webapp/src/example/main.ts'
]
}
}
It would be nice to just be able to redefine/remove it elegantly (setting entrypoints in script in package.json breaks vue ui additional views).
This should work pretty much like this - maybe you made mistake somewhere, hard to say with just code snippets.
Please provide a github repository with a fresh project containing your configuration changes so we can relaibly replicate what you are experiencing.
Also:
I found that webpack-chain does not support removing entries, only clearing entry files from entry.
Not sure what you are referring to, but should remove an entry:
config.entrypoints.delete('app')
I've tried every combination of .remove() .delete on entries, entry, entryPoints, but never tried entrypoints.
I'll give it a try tomorrow and I'll provide a minimal repo to reproduce it.
Try it:
configureWebpack: config => {
// Deleting default entry
delete config.entry.app
}