-
Notifications
You must be signed in to change notification settings - Fork 12
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 style
package export for dist/style.css
#125
Conversation
Deploying with Cloudflare Pages
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In wasn't aware of this but looks like it's a thing that webpack reads (https://webpack.js.org/guides/package-exports/#conditions)? Looks fine. What happened if the style export wasn't set? It failed rather than falling back to one of the others?
Yep, when the specific type is not specified it will result in module not found:
|
package.json
Outdated
@@ -13,7 +13,8 @@ | |||
}, | |||
"./dist/style.css": { | |||
"require": "./dist/style.css", | |||
"import": "./dist/style.css" | |||
"import": "./dist/style.css", | |||
"style": "./dist/style.css" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it make sense then to set it in the .
import? I think that would make @import "@vector-im/compound-web"
work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh good idea!
The following syntax will set the style condition: