You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
npm run build
> @ build /Users/kirpich634/Projets/rollup-keker
> node build.js
(node:15616) UnhandledPromiseRejectionWarning: Error: You must specify "output.file" or "output.dir" for the build.
at error (/Users/kirpich634/Projets/rollup-keker/node_modules/rollup/dist/shared/node-entry.js:5400:30)
at Object.write (/Users/kirpich634/Projets/rollup-keker/node_modules/rollup/dist/shared/node-entry.js:13981:28)
at rollup.then.bundle (/Users/kirpich634/Projets/rollup-keker/build.js:7:12)
According to the documentation, we can put an array inside an output option #3184
No, because this is not supported when using the JS API and is also not intended to be supported. You have been looking at the documentation for config files, not the documentation for the JS API. When directly using the JS API, the idea is that you just call bundle.generate or bundle.write once for each output.
The reason we do the strange merge is because at some point, passing input options as output options was done by some tools even though it is not intended to work this way. By specification, you should pass a single outputOptions object to bundle.write and nothing else
Expected Behavior
Will get two files 'lib/kek.js' and 'es/kek.js'
Actual Behavior
According to the documentation, we can put an array inside an output option
#3184
I've tried to localize the root of the problem in the rollup index: https://github.com/rollup/rollup/blob/master/src/rollup/index.ts
It seems that in
normalizeOutputOptions
function we always passconfig.output
into themergeOptions
as an object instead of an array:normalizeOutputOptions:
mergeOptions:
I do not understand why you do this:
Can we do something like this ??
The text was updated successfully, but these errors were encountered: