Andrew Bradley
Andrew Bradley
The use-case described in this thread does not seem susceptible to the "doesn't work on first load" problem. ``` await installLoaderUsingTheLoaderInstallationApi('transpiling-loader'); const v = await import('./plugin-or-config-etc.transpiled-language-file-extension'); ``` The loader's necessity...
I looked into that briefly, and wasn't sure if it allows us to handle imports and exports. For example if `webpack.config.ts` does `import {constantsForDefinePlugin} from './src/config/constants.js'`, then we need to:...
We can certainly debate the merits of TypeScript's import specifier behavior -- we do mappings in ts-node as well, and TypeScript's behavior seems to align with the philosophy espoused in...
Yeah, 100% agreed, loaders is the way to go. I wanted to be sure we were not still considering that webpack should use `vm` instead of loaders, since that had...
The `esm` module executes code as CommonJS, right? And it breaks for stuff like `export default await asynchronouslyDoStuffBecauseThisIsEsm();` because `esm` tries to pretend that exports are determined synchronously. Last I...
For me, the takeaway is still the same as it was some months ago: these tools achieve some level of convenience because they install a CJS loader hook in-process, mid-execution....
This is another thing that might get better with nodejs/node#43408. A clear bootstrapping phase for config discovery, with access to information about the entrypoint. This bootstrapper can discover and pass...
I realized after posting that I can explain more clearly why CLI args are not suitable for configuring loaders. "Seems like a hack" is unnecessarily vague. If I do `node...
Yeah but node should probably be passing them a resolved entrypoint path instead of asking them to figure it out themselves (is it an entrypoint? REPL? Code piped to stdin?)...
Does this design account for composing two loaders that are both trying to use these helpers? Decorator pattern can work well for stuff like this. Decorator pattern could actually work...