@wyw-in-js/nextjs 1.1.0 → 2.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,10 +23,10 @@ bun add -d @wyw-in-js/nextjs
23
23
  ## Usage
24
24
 
25
25
  ```js
26
- // next.config.js
27
- const { withWyw } = require('@wyw-in-js/nextjs');
26
+ // next.config.mjs
27
+ import { withWyw } from '@wyw-in-js/nextjs';
28
28
 
29
- module.exports = withWyw({
29
+ export default withWyw({
30
30
  // your Next config
31
31
  });
32
32
  ```
@@ -36,7 +36,7 @@ By default, the plugin:
36
36
  - injects `@wyw-in-js/webpack-loader` into Next's JS/TS pipeline;
37
37
  - emits styles as `*.wyw-in-js.module.css` so imports are allowed from any module;
38
38
  - keeps generated class names stable under Next CSS Modules (selectors are emitted as `:global(...)`).
39
- - defaults `babelOptions` to `presets: ['next/babel']` so TS/JSX parsing works out of the box.
39
+ - parses and evaluates JS/TS/JSX/TSX through the Oxc-backed WyW transform.
40
40
 
41
41
  ## Options
42
42
 
@@ -47,6 +47,6 @@ import type { WywNextPluginOptions } from '@wyw-in-js/nextjs';
47
47
  Use `loaderOptions` to pass options through to `@wyw-in-js/webpack-loader`.
48
48
 
49
49
  Use `turbopackLoaderOptions` to pass JSON-serializable options to `@wyw-in-js/turbopack-loader` (use `configFile` for
50
- function-based config).
50
+ function/RegExp-based config).
51
51
 
52
52
  To disable vendor prefixing (Stylis prefixer), set `prefixer: false` in `loaderOptions` and/or `turbopackLoaderOptions`.