-
Notifications
You must be signed in to change notification settings - Fork 69
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
Drop FastBoot.require
for 3rd dependencies?
#251
Comments
I'm definitely in favor of doing things to simplify and cleanup how to work with FastBoot, and this does seem like a logical thing to reevaluate. There are a few things that I don't fully understand how you would do in the new system:
If we do move forward with this proposal, I think that we would need a decent length deprecation cycle for |
If I understand The problem is with Node.js built-in modules, for that the
You mean that
I'm not sure if I understand correctly, but the
That makes totally sense 👍. |
This is definitely true, but today the distinction between import and not means that we never accidentally ship things inside the runtime assets that are from
No, not specifically. I mean that using
That’s great! My point was more that we need to make sure that we don’t accidentally bloat our runtime assets with SSR specific code. |
Based on the exploration I've made embroider-build/ember-auto-import#266 with @ef4's help, I'm going to update the proposal to "drop" There are already add-ons, like There are also some add-ons, like However, because |
FastBoot.require
by default?FastBoot.require
for 3rd dependencies?
A few updates to the earlier questions in this thread based on discussion around the embroider v2 addon format RFC:
This is why the
The point would be eliminating the distinction. There would no longer be any way to access node's
No. Realize that for both auto-import and embroider the distinction already doesn't exist. Trying to maintain the distinction is huge source of pain and complexity. |
Hello,
according to the upcoming major release, would it make sense to drop custom FastBoot import system and use what JavaScript has by spec?
Some benefits could be
3rd dependencies
For importing external modules from 3rd packages the ember-auto-import could be used.
Add dependencies as usual
npm install --save-dev ldclient-node ldclient-js
.Use dynamic import to conditionally import modules in FastBoot / browser.
Node.js built-in modules
FastBoot.require
will be still used for importing Node.js builtins at runtime, however it could be marked "private", because onlyember-auto-import
should use it at compile time, add-ons/applications will use native JavaScript.I'm not sure if I'm missing something that could prevent from dropping
FastBoot.require
now.Thanks
The text was updated successfully, but these errors were encountered: