I must admit, it’s quite tricky to set up a second entry point. In my case I needed to load the app with different headers through different index.html depending on the domain.
The only solution I found was to tell webpack directly, in my quasar.conf I have something like :
const env = require('quasar-dotenv').config();
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = function (ctx) {
return {
...
build: {
...
extendWebpack(cfg) {
...
cfg.plugins.push(
new HtmlWebpackPlugin({
template: `${__dirname}\\src\\index2.template.html`,
filename: 'index2.html',
chunks: 'all',
ctx: ctx,
process: { env: env },
productName: "PageTitle",
productDescription: "PageDescription"
})
);
}
}
}
}
/!\ The second index will be generated referencing the same assets and bundle.js