Skip to content

v3.1.5: Fix #75 #76

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

Merged

Conversation

JodiWarren
Copy link
Contributor

@JodiWarren JodiWarren commented May 29, 2025

Add feature scoping
@@ -112,7 +112,7 @@ export const setup = (build, _options) => {
const rpath = relative(buildRoot, path);
const prefix = basename(rpath, extname(path))
.replace(/[^a-zA-Z0-9]/g, '-')
.replace(/^\-*/, '');
.replace(/^-*/, '');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just removing an extraneous escape character

Comment on lines +324 to +325
const cssOutputsMap = Object.entries(r.metafile?.outputs ?? {})
.reduce(/** @type {(m: Record<string, string>, o: any) => Record<string, string>} */(m, [o, {inputs}]) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing a typescript failure due to it not understanding the type of the accumulator. There could be a better solution to be quite honest.

Comment on lines +7 to +9
animation: 3s linear slide-in;
display: grid;
grid-template: "image text";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To test the hashing/not-hashing of the feature scoping controls.

@@ -19,7 +19,8 @@ import cssModulesPlugin from '../index.js';
plugins: [
cssModulesPlugin({
inject: '#my-custom-element-with-shadow-dom',
emitDeclarationFile: true
emitDeclarationFile: true,
pattern: "__[hash]_[local]"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LightningCSS complains if the pattern doesn't end with [local] when grid areas are being used. See: https://lightningcss.dev/css-modules.html#css-grid

Copy link
Owner

@indooorsman indooorsman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@indooorsman indooorsman merged commit 1a6178f into indooorsman:main May 29, 2025
1 check passed
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.

Expose Feature Scoping
2 participants