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

How to support define options. #186

Open
Tracked by #177
underfin opened this issue Nov 7, 2023 · 1 comment
Open
Tracked by #177

How to support define options. #186

underfin opened this issue Nov 7, 2023 · 1 comment

Comments

@underfin
Copy link
Contributor

underfin commented Nov 7, 2023

Because the vite use esbuild define option at optimizer, the rollup has [@rollup/plugin-replace](https://github.com/rollup/plugins/tree/master/packages/replace#rollupplugin-replace) to do it, it using string match to replace, it is performance friendly but other ecosystem using last to do it, eg swc/webpack.

I think we can use @rollup/plugin-replace to do it at milestone 1. It means we need to support some plugin API for the plugin, it is easy to implement.
But we need re-think it how to support it at rolldown for better performance and correct replace result.

@kazupon
Copy link
Sponsor Contributor

kazupon commented Mar 9, 2024

I am interested in this issue and making the plugin work.

we consider performance, I think the plugin should be implemented on the Rust side.
However, we would ideally like to keep it compatible with the existing rollup plugin.
Do you have in your team about a plugin plan, how to implemetation idea?

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

No branches or pull requests

2 participants