Skip to content
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

When "type" is "style" esbuild ignores url-imported files #151

Closed
aak-lear opened this issue Oct 25, 2023 · 1 comment
Closed

When "type" is "style" esbuild ignores url-imported files #151

aak-lear opened this issue Oct 25, 2023 · 1 comment

Comments

@aak-lear
Copy link

I'm trying to bundle all files to single JavaScript file.

When I place { type: 'style' } to sass-plugin config, esbuild ignores all url(...) imports in style-files and leaves them unchanged.
This setting also affects pure css-files, which I import directly from js.

You can see example here: https://github.com/aak-lear/esbuild-with-sass-plugin-example

Just run npm i and npm run build. In the dist folder will be single javascript file with styles, that I import in the app.tsx. But woff-file imported with url(...) didn't get into the bundle.

If you remove type: 'style' in plugin config, then esbuild will bundle all css to separate file and resolve imported woff-file

@aak-lear aak-lear changed the title When "type" is "style", esbuild ignores url-imported files When "type" is "style" esbuild ignores url-imported files Oct 25, 2023
@glromeo
Copy link
Owner

glromeo commented Oct 25, 2023

please read carefully the type section in the README
https://github.com/glromeo/esbuild-sass-plugin#type
this has already been discussed here
#92 (comment)

@glromeo glromeo closed this as completed Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants