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.
The PR does two things:
node_modules
from style9 loadernode_modules
if they want). The change only affects Next.js users.style9
stringstyle9
, but for the webpack loader we can bail out even earlier to skip the entirebabel.parseAsync
.