Closed bes-internal closed 1 month ago
Instead of echo " import './some.css'; " | esbuild ...
you can use either cat some.css | esbuild --loader=css ...
or even just esbuild some.css ...
.
I'm closing this issue as invalid. You are getting a .js file because you are bundling JavaScript. This is expected behavior. You have to bundle only CSS input to produce only CSS output (as described above).
1 - only css
I wish bundle only css and run:
That produce
dist/stdin.css
as expected anddist/stdin.js
with content:Expected: no dist/stdin.js if there is no content of js
2 - only css outfile
I wish bundle only css with use
--outfile
for that and run:That produce error:
because outfile means one file but there is css content and empty js content!
Expected:
ebsuild produce only final.css if no js bundle output
3 - empty
emtpy input:
Expected - empty, but produce -
(()=>{})();