-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat(VanillaExtract): Use custom identifier generation #1299
Conversation
Size stats
|
Accessibility report ℹ️ You can run this locally by executing |
Deploy preview for mistica-web ready! ✅ Preview Built with commit dbd799d. |
|
||
export default defineConfig({ | ||
plugins: [ | ||
react(), | ||
vanillaExtractPlugin(), | ||
vanillaExtractPlugin({ | ||
identifiers: ({hash}) => `${version}_${hash}`, |
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.
another idea, to create shorter identifier names:
Create a map hash=>autoincrementCounter
and the resulting identifiers would be: v{version}_i{counter}
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.
I'm not sure if that approach would work. If vite uses multiple processes to compile files, you'd have collisions
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.
ok, leaving this as is
|
||
export default defineConfig({ | ||
plugins: [ | ||
react(), | ||
vanillaExtractPlugin(), | ||
vanillaExtractPlugin({ | ||
identifiers: ({hash}) => `${version}_${hash}`, |
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.
I'm not sure if that approach would work. If vite uses multiple processes to compile files, you'd have collisions
🎉 This PR is included in version 16.7.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Prefix Vanilla Extract identifier names with Mistica version to avoid name collision in a module federation context