how to handle css import?
See original GitHub issueI’m trying to run like this
node - esbuild-register ./script/some.ts
it breaks when hits a .css file
node_modules/emoji-mart/css/emoji-mart.css:1
.emoji-mart,
^
SyntaxError: Unexpected token '.'
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1031:15)
at Module._compile (node:internal/modules/cjs/loader:1065:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Object.newLoader (app/node_modules/esbuild-register/dist/node.js:2262:9)
is there a way to make it “bundle” css
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:10 (1 by maintainers)
Top Results From Across the Web
import - CSS: Cascading Style Sheets - MDN Web Docs
The @import CSS at-rule is used to import style rules from other valid stylesheets. An @import rule must be defined at the top...
Read more >CSS @import Rule - W3Schools
The @import rule allows you to import a style sheet into another style sheet. The @import rule must be at the top of...
Read more >Best way to include CSS? Why use @import? - Stack Overflow
In that one case the parent CSS file has to be downloaded first, complete its CSS parsing and download first, discover the @imports,...
Read more >CSS Import - KeyCDN
It describes how the elements should be rendered on screen. This is where the CSS @import at-rule steps in to help. The @import...
Read more >How to include one CSS file in another? - GeeksforGeeks
Note: There are two different ways to import a CSS file into another using @import url(“style2.css”); or @import “style2.css”; or directly ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
And don’t forget to check this out https://esbuild.github.io/content-types/#css
esbuild-register
support loadercss
too.Have you tried to create your own register like this ?
However, this works for global style sheet (not CSS module).