Comments (7)
Let's skip 🙂
from loaders.
I don't have any objections to that PR beyond the comments I left on it. Do you have plans for a registry beyond what I see in the PR? We can discuss tomorrow.
from loaders.
We can chat tomorrow if you and @aduh95 are available. I think we at least need a page in https://nodejs.org/en/docs/guides spelling out what people should do. I would start with that, get something really solid written there, because whatever steps we recommend in that would be what we would try to automate with a script.
Then the error message can both link to that guide and provide a command to run like npx @nodejs/add-typescript
that would run something from npm that would prompt the user into enabling TypeScript support per whatever method we recommend in the guide; maybe it’s a wizard that presents a variety of options, etc. Having it be an npx script means that we avoid the problem of Node making network calls; and we aren’t tied to Node version, so it can be updated over time separately from Node. And then we can make the script as elaborate as we want; it can integrate with --env-file
, etc. If and when we support a Node config file via JSON instead of .env
, we can update the script to use that instead. And so on.
I think this is all we need. The only “registry” would be something within Node core that triggers appropriate error messages, like the TypeScript extensions prompting the TypeScript-specific message, as you have in that PR. I think that’s fine. What I was concerned about was some kind of registry that would be user configuration, akin to require.extensions
, since our current ways of registering loaders don’t map cleanly to a file extension-based approach.
from loaders.
@GeoffreyBooth in a chat we had a few days ago, you mentioned what I think is a material objection to a fundamental piece (a file extension map) of nodejs/node#49704. Should we discuss that here? I'd like to understand the root of your concern, and how it might be addressed, because I think what Antoine and I have roughed out is essential to this feature.
RE pointing to a guide, I think that's okay for v0.5 but doesn't fit the bill for a final feature (everyone having to look something up does not seem "first class", which is the mandate of the feature).
from loaders.
Oh! Then great 🙂
I think a dual approach would be ideal—local and remote. Antoine's point that node does not make any requests on its own is a strong argument against node specifically fetching that; if we can fetch it some other way (eg npm search
), I think that would be best. If there's no automated way, perhaps next-best is to print a message pointing to a guide, wherein the user can download (or copy+paste into a file) some kind of config for node to consume.
A key step (as far as I see it) is the loader getting automatically written into some config (eg .env) that node will henceforth consume.
Otherwise, this does little more than a blog post, which already exist today.
from loaders.
Cool. Works for me 🙂
I'm available. Sounds like maybe we don't need to meet after all now though?
from loaders.
Either way is fine by me, just let me know.
from loaders.
Related Issues (20)
- Loaders allow breaking JS spec invariants HOT 16
- Official `fs` overlay HOT 3
- Node.js Loaders Team Meeting 2023-11-21
- bug: CJS exports analysis reads directly from disk HOT 7
- Node.js Loaders Team Meeting 2023-12-05 HOT 9
- Node.js Loaders Team Meeting 2023-12-19
- Bad coverage information when loaders are used
- Node.js Loaders Team Meeting 2024-01-02
- Node.js Loaders Team Meeting 2024-01-16 HOT 2
- improve registration HOT 2
- Node.js Loaders Team Meeting 2024-01-30 HOT 3
- --experimental-loader breaks in Node 18.19 HOT 5
- Node.js Loaders Team Meeting 2024-02-13 HOT 1
- Node.js Loaders Team Meeting 2024-02-27 HOT 2
- Node.js Loaders Team Meeting 2024-03-12 HOT 1
- Node.js Loaders Team Meeting 2024-03-26 HOT 1
- Node.js Loaders Team Meeting 2024-04-09 HOT 15
- Node.js Loaders Team Meeting 2024-04-13
- Node.js Loaders Team Meeting 2024-04-23 HOT 3
- Node.js Loaders Team Meeting 2024-05-07 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loaders.