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

Import scss / svg #236

Closed
munrocket opened this issue Jul 7, 2020 · 2 comments
Closed

Import scss / svg #236

munrocket opened this issue Jul 7, 2020 · 2 comments

Comments

@munrocket
Copy link

munrocket commented Jul 7, 2020

FYI

import './index.css';
       ~~~~~~~~~~~~~
src/components/UploadsExtContainer/UploadsExtContainer.tsx:10:16: error: File extension not supported: src/components/UploadsExtContainer/UploadsExtContainer.module.scss
import stl from './UploadsExtContainer.module.scss';
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/components/UploadsExtContainer/UploadsExtContainer.tsx:6:22: error: File extension not supported: src/ui/icons/thinArrow.svg
import arrowIcon from '@/ui/icons/thinArrow.svg';
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~

🚀

@evanw
Copy link
Owner

evanw commented Jul 7, 2020

CSS support is tracked by #20. I believe it should be possible to use SCSS once that and #111 are implemented.

SVG may already work depending on what you need the bundler to do for you. For example, --loader:.svg=text. will cause import arrowIcon from '@/ui/icons/thinArrow.svg' to populate arrowIcon with the SVG file as a string.

@evanw
Copy link
Owner

evanw commented Nov 11, 2020

Documentation for the plugin API has now been released: https://esbuild.github.io/plugins/. Closing this because you should be able to build these integrations yourself.

@evanw evanw closed this as completed Nov 11, 2020
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