Support allowing an entry's name to be specified?
Would you be open to a PR that allows users to specify the name (prefix) of an entry? I'm happy to do the work, just want to make sure it would be accepted if I did. It would look something like:
// config-overrides.js
const multipleEntry = require('react-app-rewire-multiple-entry')([
{
name: 'landing', // <-- new property that would cause a filename of landing.[contenthash].chunk.js
entry: 'src/entry/landing.js',
template: 'public/landing.html',
outPath: '/landing.html'
}
]);
module.exports = {
webpack: function(config, env) {
multipleEntry.addMultiEntry(config);
return config;
}
};
In essence the change would be in the return statement of getValidSettings:
return {
name: entry.name || formatName(entry.entry), // <-- only call formatName if a name isn't specified
entry: entryPath,
template: entry.template,
outPath: entry.outPath
};
This should be backwards compatible with all existing uses, but allow finer grained control over the naming of outputted files.
@Derek-Hu It is really helpful to have entry name support, do you have a plan to add it?
+1
The output entry name is friendly for most users: https://github.com/Derek-Hu/react-app-rewire-multiple-entry/issues/15
In case of entry name conflict unconsciously, customize entry name by user is allow.
+1