Open IanVS opened 1 year ago
@IanVS vite-plugin-external
or vite-plugin-externals
? Would you mind if I got an example from you about this issue, actually I do not know this issue https://github.com/rollup/rollup/issues/2374 because I never do output.globals
and esm
output format together.
Sorry, vite-plugin-external
. I was trying to use this plugin along with vite in middleware mode to replace references to internal storybook packages with references from the global scope. https://github.com/storybookjs/storybook/pull/19978 is the PR where I ended up using https://www.npmjs.com/package/rollup-plugin-external-globals instead.
I experimented with
vite-plugin-externals
, but it didn't seem to have any effect. Then I came across https://github.com/rollup/rollup/issues/2374, which notes thatexternal
andoutput.globals
only work withiife
orumd
output formats. Maybe there should be a disclaimer in the readme to explain that?