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

[Discussion] Does embroider do dependency pre-bundling like ViteJS does ? #788

Closed
siva-sundar opened this issue Apr 27, 2021 · 3 comments
Closed

Comments

@siva-sundar
Copy link

Just trying out embroider for some of our apps. Bit curious to know whether embroider does some kind of dependency pre-bundling(like vitejs) to speed up the server startup time.

@siva-sundar siva-sundar changed the title [Discussion] Does embroider do dependency pre-bundling like vite does ? [Discussion] Does embroider do dependency pre-bundling like ViteJS does ? Apr 27, 2021
@ef4
Copy link
Contributor

ef4 commented Apr 27, 2021

That's not a feature that would belong in Embroider itself, because Embroider is not a Javascript bundler. It delegates to a Javascript bundler, after compiling away Ember-specific conventions and backward-compatibility problems. Embroider can use Vite, though that is not yet as polished as using it with webpack.

@ef4 ef4 closed this as completed Apr 27, 2021
@siva-sundar
Copy link
Author

Thanks for the response!

It delegates to a Javascript bundler, after compiling away Ember-specific conventions and backward-compatibility problems.

Just curious to know whether we could apply pre-bundling for this compilation part.

@ef4
Copy link
Contributor

ef4 commented Apr 28, 2021

Yes, the goal is to get all addons to ship in the new v2 format, which means they will be pre-built by their authors down to the standard format and won't need any preprocessing by embroider at all.

I would add that the dependency pre-building step in Vite (and Snowpack) is a cost, not a benefit, of that build architecture. It's mostly needed because so many dependencies still ship as CommonJS and not ES modules. It would be better not to need it and instead get library authors to directly ship a minimal set of ES modules.

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