Skip to content
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

docs: update READMEs for next-extraction-plugin & webpack-loader #194

Merged
merged 3 commits into from
Aug 17, 2022

Conversation

layershifter
Copy link
Member

This PR updates README files based on feedback from #190.

@layershifter layershifter marked this pull request as ready for review August 12, 2022 09:56
@layershifter layershifter requested a review from a team as a code owner August 12, 2022 09:56
@github-actions
Copy link

github-actions bot commented Aug 12, 2022

📊 Bundle size report

🤖 This report was generated against da92d1296bec8f44491952457f87fef418340cf4

Copy link
Contributor

@yume-chan yume-chan left a comment

Choose a reason for hiding this comment

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

I have tested my proposed changes with #195 patched locally. Both manually install @babel/preset-typescript and use next/babel directly works.

```js
// next.config.js
const { withGriffelCSSExtraction } = require('@griffel/webpack-extraction-plugin');
const { withGriffelCSSExtraction } = require('@griffel/next-extraction-plugin');

module.exports = withGriffelCssExtraction()({
Copy link
Contributor

Choose a reason for hiding this comment

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

It is CSS in require statement but Css here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, thanks 👍


// If your project uses TypeScript
config.module.rules.push({
test: /\.(ts|tsx)$/,
exclude: /node_modules/,
use: [
{
loader: '@griffel/webpack-loader',
Copy link
Contributor

Choose a reason for hiding this comment

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

Also need babelOptions here.

Note that in a typical Next app, @babel/preset-typescript needs to be installed manually.

Maybe better to use next/babel preset which comes with Next, see https://nextjs.org/docs/advanced-features/customizing-babel-config

Copy link
Member Author

Choose a reason for hiding this comment

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

Good call, added 👍

Copy link
Contributor

@yume-chan yume-chan left a comment

Choose a reason for hiding this comment

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

LGTM.

Co-authored-by: ling1726 <lingfangao@hotmail.com>
@layershifter layershifter enabled auto-merge (squash) August 17, 2022 08:51
@layershifter layershifter merged commit b699b09 into microsoft:main Aug 17, 2022
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.

3 participants