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

add vite compat styles resolver #1854

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

patricklx
Copy link
Contributor

There are.scss or .less files in some v1 addons, which currently can only be consumed because they are copied to rewritten-app/assets.

But i could now do something like this in vite:

// my-app/app.scss
@use 'my-v1-addon'

And have app.js import app.scss

@patricklx patricklx force-pushed the compat-styles branch 4 times, most recently from 0d48436 to a4e1d53 Compare March 26, 2024 09:48
@ef4
Copy link
Contributor

ef4 commented Apr 16, 2024

Discussed this together in office hours.

This is implementing a feature that might be useful for people who are ready to completely opt out of the classic style pipeline. But it doesn't mix well with that pipeline.

Today, sass from v1 addons does work in the classic app/styles/app.scss and gets handled entirely in the broccoli-based prebuild for compatibility. This is different from configuring vite to directly build sass, which does not have access to sass from v1 addons.

An @embroider/sass plugin that uses embroider's resolver to locate files in classic addons would be a potentially useful new addition, but would be mutually exclusive with the use of @embroider/synthesized-vendor.

@mansona
Copy link
Member

mansona commented Apr 29, 2024

I'm marking this as "waiting for contributor" since @ef4 laid out a way forward and this PR would need extra work before we could consider merging 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants