-
Notifications
You must be signed in to change notification settings - Fork 26
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
How should this interact with tools? #22
Comments
Reposting my comment here: I think another use case would be for tooling; transpilers could tune their code generation based on attributes for instance: import {a} from "b" with parserPlugin: 'jsx'; or a bundler using loaders: import {a} from "b" with loader: 'babel'; or bundlers using multiple loaders for the same type but not the same runtime representation: import img from "./my_resource" with type: "image", as: "json"; This proposal allows arbitrary keys so it could be anything. |
Bundlers use multiple loaders with configurations: import Styles from "./styles.css" with loaders: [
{ loader: "style" },
{ loader: "css", options: { modules: true } }
]; The example is taken from Webpack Loaders Doc. |
This isn't the first time I've heard the idea of JSON-like data in module attributes. It might be worth more consideration. |
JS build tools may be another place where module attributes could be given meaning. Would this be useful? Desirable for the ecosystem? Cc @jhnns @sokra @guybedford @xtuc @lukastaegert
The text was updated successfully, but these errors were encountered: