Skip to content

Support css content in esbuild plugin#361

Merged
ai merged 1 commit intoai:mainfrom
just-boris:main
Mar 21, 2024
Merged

Support css content in esbuild plugin#361
ai merged 1 commit intoai:mainfrom
just-boris:main

Conversation

@just-boris
Copy link
Copy Markdown
Contributor

@just-boris just-boris commented Mar 21, 2024

parse('index.css').name and parse('index.js').name prodiuces the same index key, which overwrites one of the entries.

Use base to prevent conflicts and use index.js/index.css as the keys.

Fixes #360

@ai
Copy link
Copy Markdown
Owner

ai commented Mar 21, 2024

Lgtm. Do you want to add anything (PR is marked as draft) or we ready for merge?

@just-boris just-boris marked this pull request as ready for review March 21, 2024 13:24
} else {
throw new SizeLimitError('unknownEntry', i)
for (let entry of check.entry) {
let matches = Object.keys(outputs).filter(key => parse(key).name === entry)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Make sure entry matching still uses path.parse(entry).name as before

`Unknown argument *${arg}*. Check command for typo and read docs.`,
unknownEntry: entry =>
`Size Limit didn’t find *${entry}* entry in custom Webpack config`,
`Size Limit didn’t find *${entry}* entry in the custom bundler config`,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Spent some time in confusion how esbuild change may break anything with webpack config. Let's rename the error message to a more generic

@ai ai merged commit ed7b9ab into ai:main Mar 21, 2024
@just-boris just-boris deleted the main branch March 22, 2024 14:25
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.

Esbuild plugin produces incorrect numbers when CSS used

2 participants