We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
js now supports importing css modules, the type is CSSStyleSheet, refer to the documentation. https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Statements/import
demo.js
import reset from './reset.css' with { type: 'css' }; document.adoptedStyleSheets = [reset];
Unfortunately, Bun.build doesn't support this, and my suggestion is like this:
Bun.build({ loader: { ".css": "CSSStyleSheet", }, naming: { CSSStyleSheet: "/css/[name].css", } });
import reset from '/css/reset.css' with { type: 'css' }; document.adoptedStyleSheets = [reset];
Bun.Transpiler with similar functionality to Bun.build removes with { type: 'css' };, please improve it, 3Q
with { type: 'css' };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
js now supports importing css modules, the type is CSSStyleSheet, refer to the documentation.
https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Statements/import
demo.js
Unfortunately, Bun.build doesn't support this, and my suggestion is like this:
demo.js
Bun.Transpiler with similar functionality to Bun.build removes
with { type: 'css' };
, please improve it, 3QThe text was updated successfully, but these errors were encountered: