Skip to content

Conversation

@layershifter
Copy link
Member

@layershifter layershifter commented Dec 7, 2022

With changes in this PR we don't use this file anymore. The recipe is described in Webpack's documentation. It was impossible to do it before #277, but now we don't rely on cacheGroups anymore.

Before

CSS was was emitted to a fake file griffel.css in the virtual loader, this file has a path that might look like node_modules/@griffel/webpack-extraction-plugin/virtual-loader/griffel.css. Image files are relative to the userland code
file, so we had to construct a relative path from the fake CSS file to the image file in userland code.

After

The fake griffel.css file is is under the same path as the original code file, so there is no need to do any changes to the image path since it will already be relative to the original code file.

@github-actions
Copy link

github-actions bot commented Dec 7, 2022

📊 Bundle size report

🤖 This report was generated against b812096682867be3d15ddb8a2027daf6142ebbf6

@layershifter layershifter force-pushed the chore/use-real-paths branch 3 times, most recently from 708ed4a to 4916ceb Compare December 8, 2022 20:34
Comment on lines +100 to +102
// Heads up!
// This is probably a bug, but "import" does not work properly there: files from node_modules are processed, but
// they will not be present in chunks 😳
Copy link
Member Author

Choose a reason for hiding this comment

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

This costs me 5 hours of debugging in product, will create an issue in Webpack as it's clearly bug in Webpack or in css-loader/mini-css-extract.

@layershifter layershifter marked this pull request as ready for review December 8, 2022 20:36
@layershifter layershifter requested a review from a team as a code owner December 8, 2022 20:36
@layershifter layershifter merged commit 9b94a45 into microsoft:main Dec 9, 2022
@layershifter layershifter deleted the chore/use-real-paths branch December 9, 2022 10:59
layershifter added a commit to layershifter/griffel that referenced this pull request Feb 8, 2023
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.

2 participants