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

Improve style9 webpack performance #74

Merged

Conversation

SukkaW
Copy link
Contributor

@SukkaW SukkaW commented Sep 23, 2022

The PR does two things:

  • For Next.js plugin, exclude node_modules from style9 loader
    • A library that uses style9 should not be consumed directly, it should be transpiled before publishing to npm
    • The change doesn't affect existing webpack users (they will have to manually exclude node_modules if they want). The change only affects Next.js users.
  • Make the style9 loader bail out early if the input doesn't include the style9 string
    • The style9 babel plugin already bails out early if the import declaration doesn't contain style9, but for the webpack loader we can bail out even earlier to skip the entire babel.parseAsync.

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.

None yet

2 participants