-
Notifications
You must be signed in to change notification settings - Fork 59
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
docs: update READMEs for next-extraction-plugin & webpack-loader #194
Conversation
📊 Bundle size report🤖 This report was generated against da92d1296bec8f44491952457f87fef418340cf4 |
There was a problem hiding this 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()({ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, added 👍
There was a problem hiding this 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>
This PR updates README files based on feedback from #190.