Replies: 1 comment
-
Nevermind, given other things like needing sep. package.json it makes sense to have them as separate projects |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Given rollup.config exporting multiple configs:
export default [defineConfig(reactConfig), defineConfig(solidConfig)]
, how can we alter the babel config for each one?Babel has a built in way for conditions based on "env" (BABEL_ENV with fallback NODE_ENV). But it's unclear how to set a
process.env
var per config?At the bottom of the docs there is mention of createBabelInputPluginFactory (although no mention of how to actually use it and can't see what option to pass it into). This allows us to add a plugin on a condition, although not sure if the file name is passed anywhere so that I could set e.g. something ending in
.react.*$
vs.solid.*$
.Babel plugin should allow us to set the config file path (not just in output but also input)
babel.config.js (JavaScript config)
Would allow more dynamic checking but Babel warns this can impact caching - does Rollup cache better if the config is static? Anyway as mentioned not sure how to execute code per config such as setting an env var (see point 1)
Beta Was this translation helpful? Give feedback.
All reactions