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

feat(nextjs): next plugin and example #1045

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LeoTexx
Copy link

@LeoTexx LeoTexx commented Aug 11, 2022

This PR adds the nextjs plugin and an example using it

@Anber
Copy link
Collaborator

Anber commented Aug 21, 2022

Hi @LeoTexx!
It looks good to me. Could you please remove all package-lock.json from the PR and then run pnpm install locally to merge pnpm-lock.yaml?
Thank you!


const nextConfig = withLinaria({
reactStrictMode: true,
swcMinify: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

this is more a question rather than a request for change but... how is this actually working internally?

if there isn't any .babelrc / babel.config.json then Next uses SWC instead of Babel. Furthermore, this example is enabling to minify using SWC instead of Terser. See Next.js Compiler

@LeoTexx is this example working with Babel (and just Next is internally opting out from any config in the monorepo) or is this example somehow magically working using next's SWC loader as opposed to babel-loader? if the former, we should make it explicit by adding a babel config.

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