-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to output multiple bundles #268
Comments
I'm having a similar issue, I can't seem to find a clear way to configure output directories relative to the individual inputs...? |
import { Config } from 'bili'
import _config from './config.json'
let index = 0
const config: Config = {
input: _config.bundles.map(bundle => bundle.entry),
output: {
format: 'amd-min',
fileName: '[name][ext]',
target: 'browser',
sourceMap: false,
},
extendRollupConfig: config => {
const bundle = _config.bundles[index++]
config.outputConfig.entryFileNames = bundle.dist
config.outputConfig.amd = {
id: bundle.dist,
}
return config
},
}
{
"bundles": [
{
"entry": "src/project-a/index.ts",
"dist": "projecta.js"
},
{
"entry": "src/project-b/index.ts",
"dist": "projectb.js"
}
]
} |
@johannes-z great workaround but this looks horrible. Yesterday I setup rollup manually with this feature and it took me 1 hour to compile my libs without Bili. It would be awesome to contribute to Bili but the maintenance is very low. It would be great to hear more feedback from the creators. |
If I have a config with an array of entry points (each of which have the same file name), how can I create multiple bundles?
The following example would output
index.js
twice, so the second bundle overwrites the first one...The text was updated successfully, but these errors were encountered: