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 support for import assertion resolution #45

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Westbrook
Copy link

@Westbrook Westbrook commented Dec 31, 2023

Allow code like:

import styles from 'x/styles.css' with { type: 'css' };

to be processed down to

import styles from './node_modules/x/styles.css' assert { type: 'css' };

There is zero support or with { ... } as yet, so it seemed like processing to something with at least a little support was the right call for right now.

Possibly worth do a test with assert for the currently available support, so let me know if you'd like that added as well.

Looking to leverage this in tachometer to measure the perf benefits of switching from component.css.js file to component.css files in packages for https://opensource.adobe.com/spectrum-web-components/

@Westbrook
Copy link
Author

Also, I ended up doing a bunch of updating before actually updating the API consumption which might not have been needed if I started with the code changes. Let me know if it's worth trying to reduce the amount of changes taken on in this PR.

@Westbrook
Copy link
Author

Oh, hey, any chance of getting this added to the library?

@Westbrook
Copy link
Author

When this lands/releases, tachometer is on "koa-node-resolve": "^1.0.0-pre.8", so in theory a 1.0 or 1.0.0-pre.9 would auto resolve in my projects? If not, we may need a release of both...

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

Successfully merging this pull request may close these issues.

2 participants