FORMATS multiple parameters are lost
Version
3.0.1
Reproduction link
Steps to reproduce
yarn build reactivity -f cjs,esm-bundler
yarn run v1.22.10 $ node scripts/build.js reactivity -f cjs,esm-bundler
/Users/aaron/github/master/vue-next/packages/reactivity/src/index.ts → packages/reactivity/dist/reactivity.cjs.js... created packages/reactivity/dist/reactivity.cjs.js in 1.9s
/Users/aaron/github/master/vue-next/packages/reactivity/src/index.ts → packages/reactivity/dist/reactivity.cjs.prod.js... created packages/reactivity/dist/reactivity.cjs.prod.js in 129ms
✨ Done in 3.52s.
What is expected?
Packaging results of cjs and esm-bundler
What is actually happening?
Only cjs is output
Consider modifying the connection method of multiple parameters, such as: modify, as.
(The FORMATS parameter and the --environment method are repeated resulting in missing parameters)
Add reproduction link
https://github.com/AaronBank/vue-next/commit/312daa498b1b605d5bda20a1e423d231fba164f7
Sorry for this closed issue, I think the problem still exists.
yarn build reactivity -f cjs,esm-bundler
will execute build.js
file, and create rollup environment dynamically, for example, rollup -c --environment TARGET:reactivity,EVNIRONMENT:cjs,esm-bundle
, so far so good, next rollup resolved the environment split by comma, and process.env become this as follows:
TARGET: 'reactivity', FORMATS: 'cjs', esm-bundler: 'true'
so the command only generated cjs format files.