Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only works when format is iife or umd? #13

Open
IanVS opened this issue Nov 27, 2022 · 2 comments
Open

Only works when format is iife or umd? #13

IanVS opened this issue Nov 27, 2022 · 2 comments

Comments

@IanVS
Copy link

IanVS commented Nov 27, 2022

I experimented with vite-plugin-externals, but it didn't seem to have any effect. Then I came across rollup/rollup#2374, which notes that external and output.globals only work with iife or umd output formats. Maybe there should be a disclaimer in the readme to explain that?

@fengxinming
Copy link
Owner

@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 rollup/rollup#2374 because I never do output.globals and esm output format together.

@IanVS
Copy link
Author

IanVS commented Nov 28, 2022

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. storybookjs/storybook#19978 is the PR where I ended up using https://www.npmjs.com/package/rollup-plugin-external-globals instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants