Skip to content

Conversation

@JodiWarren
Copy link
Contributor

@JodiWarren JodiWarren commented May 29, 2025

Add feature scoping
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.

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