Support multiple configs/bundles in parallel#1389
Merged
Merged
Conversation
Contributor
Author
|
This is how I manually handle #372 until there is a better solution in Rollup internals. |
Contributor
|
This is great, thank you! Even works in |
|
Here's a pattern some may wish to use to leverage this feature to produce minified bundles without duplicating config: import uglify from 'rollup-plugin-uglify'
import { minify } from 'uglify-es'
const activeConfigs = [ /* array of rollup config objects */ ]
const minifiedConfigs = activeConfigs.reduce(
(minifiedConfigs, activeConfig) => minifiedConfigs.concat(
Object.assign({}, activeConfig, {
plugins: [uglify({}, minify), ...activeConfig.plugins],
dest: activeConfig.dest.replace('js', 'min.js')
})
),
[]
)
export default activeConfigs.concat(minifiedConfigs)Assumes And here's what it looks like in the context of a production module without Babel. |
This was referenced Jun 4, 2017
Closed
14 tasks
Closed
vhscom
added a commit
to vhscom/fetch-inject
that referenced
this pull request
Mar 5, 2022
vhscom
added a commit
to vhscom/fetch-inject
that referenced
this pull request
Mar 5, 2022
vhscom
added a commit
to vhscom/fetch-inject
that referenced
this pull request
Mar 5, 2022
vhscom
added a commit
to vhscom/fetch-inject
that referenced
this pull request
Mar 5, 2022
vhscom
added a commit
to vhscom/fetch-inject
that referenced
this pull request
Mar 5, 2022
vhscom
added a commit
to vhscom/fetch-inject
that referenced
this pull request
Mar 5, 2022
|
What should we do if we want to build a bunch of assets in parallel but we want to host 1 webserver that contains multiple landing pages that are artifacts of the parallel builds? Should I just configure ONE of the parallel builds with the webserver? Will livereload be triggered across parallel builds? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for rolling multiple bundles (with their own configs, or at least with their own entry/dest options) in parallel.
rollup.config.jscan now export an array of objects, or a single object.