- 
                Notifications
    You must be signed in to change notification settings 
- Fork 68
Open
Labels
Description
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
- following the spec,
- simplifying FastBoot build process.
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. 
// simplified example
let ldclient;
if (typeof FastBoot !== 'undefined') {
  ldclient = await import('ldclient-node');
} else {
  ldclient = await import('ldclient-js');
}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 only ember-auto-import should use it at compile time, add-ons/applications will use native JavaScript.
// input
import os from 'os';
const os = await import('os');
// output
const os = FastBoot.require('os'); 
const os = await FastBoot.require('os');I'm not sure if I'm missing something that could prevent from dropping FastBoot.require now.
Thanks