For AI agents: the complete documentation index is available at /zh/llms.txt, the full documentation bundle is available at /zh/llms-full.txt, and this page is available as Markdown at /zh/changelog/lynx-js--css-extract-webpack-plugin.md.
这是开发预览网站。请访问正式文档 lynxjs.org

@lynx-js/css-extract-webpack-plugin

0.10.1

Patch Changes

  • Allow the next minor of @lynx-js/template-webpack-plugin as a peer dependency. (#3362)

0.10.0

Minor Changes

  • Rename the lazy bundle output directory from async/ to lazy-bundle/. (#2993)

    Lazy bundles can now also be loaded synchronously with import(..., { with: { mode: 'sync' } }), so the async/ directory name no longer matches how they are used. The default lazyBundleFilename becomes lazy-bundle/[name].[fullhash].bundle, and the intermediate outputs move from .rspeedy/async/<name>/ to .rspeedy/lazy-bundle/<name>/ accordingly.

    Update deployment scripts that reference the dist/async/ directory to use dist/lazy-bundle/ instead.

    @lynx-js/css-extract-webpack-plugin requires @lynx-js/template-webpack-plugin ^0.14.0.

0.9.0

Minor Changes

  • Stop injecting webpackChunkName into dynamic imports so lazy bundle intermediate files stay inside the output directory. (#2961)

    The ReactLynx transform injected webpackChunkName: "<request>-react__<layer>", so a dynamic import resolving above the compiler context (e.g. import('../../Foo.js')) leaked ../ into [name]/[id] and the intermediate js/css/hmr files escaped the output directory. Async chunks now keep rspack's own ids, __webpack_require__.lynx_aci maps them by chunk id, and each lazy bundle's intermediate JS and CSS are emitted under .rspeedy/async/<bundle-name>/<layer>.js and <layer>.css next to its other intermediate outputs (tasm.json, debug-metadata.json, CSS hot-update files). Explicit webpackChunkName comments written by users are still honored and keep the user-controlled [name] placement. Main-thread chunks no longer emit CSS hot-update files — CSS only exists on the background thread, and the main-thread HMR runtime receives updates from it.

    These packages release together and must be upgraded together: @lynx-js/react-webpack-plugin and @lynx-js/css-extract-webpack-plugin require @lynx-js/template-webpack-plugin ^0.13.0, and @lynx-js/react-rsbuild-plugin requires @lynx-js/react ^0.123.0.

Patch Changes

  • Widen the @lynx-js/template-webpack-plugin peer range to ^0.13.0 to accept the (#2584) minor that ships the FetchBundle chunk encoding.

0.8.0

Minor Changes

  • BREAKING CHANGE (#2803)

    Remove CssExtractWebpackPlugin / CssExtractWebpackPluginOptions along with the mini-css-extract-plugin dependency. Use CssExtractRspackPlugin instead.

    The cssPlugins option is now optional, defaulting to [CSS.Plugins.removeFunctionWhiteSpace()].

  • BREAKING CHANGE (#2803)

    Drop webpack support — the plugins now target Rspack only. All public types come from @rspack/core instead of webpack (e.g. Compiler, Compilation, LoaderContext), and the webpack dependency is removed.

Patch Changes

  • Prefix Lynx runtime module names with webpack/runtime/ (e.g. Lynx async chunkswebpack/runtime/lynx async chunks), matching the path-structured naming of the bundler's built-in runtime modules. The previous bare names had no path segment, so when they appear as a source-map sources entry under a file:// module-filename template they collapsed into an invalid URL authority (the space-containing name became the host) and broke SourceMapConsumer parsing. (#2642)

  • Widen peer ranges to admit the new minor versions of @lynx-js/template-webpack-plugin (^0.12.0) and @lynx-js/rspeedy (^0.15.0) shipping with the unified debug-metadata.json feature. (#2642)

0.7.1

Patch Changes

  • Fix CSS source map line offsets when wrapping extracted CSS with cssId metadata. (#2514)

  • Support @lynx-js/template-webpack-plugin v0.11.0. (#2483)

0.7.0

Minor Changes

  • BREAKING CHANGE: Require @lynx-js/template-webpack-plugin 0.10.0. (#1965)

  • Merge all css chunk and generate a .css.hot-update.json file for each bundle. (#1965)

0.6.5

Patch Changes

  • Set main thread JS basename to lepusCode.filename in tasm encode data. It will ensure a filename is reported on MTS error without devtools enabled. (#1949)

0.6.4

Patch Changes

  • Avoid generating .css.hot-update.json when HMR is disabled. (#1811)

0.6.3

Patch Changes

  • Supports @lynx-js/template-webpack-plugin 0.9.0. (#1705)

0.6.2

Patch Changes

  • Fix "emit different content to the same filename" error (#1482)

0.6.1

Patch Changes

  • Support Rspack v1.4.9. (#1351)

0.6.0

Minor Changes

  • Fix CSS HMR crash issues by using the same encode options with the main template. (#1033)

0.5.4

Patch Changes

  • Support @lynx-js/template-webpack-plugin v0.7.0. (#880)

  • Support Rspack v1.3.11. (#866)

0.5.3

Patch Changes

  • Fix CSS HMR not working with nested entry name. (#456)

  • fix: add enableCSSInvalidation for encodeCSS of css HMR, this will fix pseudo-class (such as :active) not working in HMR. (#435)

0.5.2

Patch Changes

  • feat(css-extra-webpack-plugin): Support css hmr for lazy bundle (#155)

0.5.1

Patch Changes

  • Support NPM provenance. (#30)

0.5.0

Minor Changes

  • 1abf8f0: Use compilation hash for css.hot-update.json to avoid cache.

Patch Changes

  • 1abf8f0: Set the default targetSdkVersion to 3.2.

0.4.1

Patch Changes

  • ad49fb1: Support CSS HMR for ReactLynx

0.4.0

Minor Changes

  • a217b02: BREAKING CHANGE: Change the format of scoped CSS.

    - @file "<file-key>" {
    -   <content>
    - }
    - @cssId <css-id> "<file-key>" {}
    + @cssId "<css-id>" "<file-key>" {
    +   <content>
    + }

Patch Changes

  • 0d3b44c: Support @lynx-js/template-webpack-plugin v0.6.0.

0.3.0

Minor Changes

  • 587a782: BREAKING CHANGE: Requires @lynx-js/template-webpack-plugin v0.5.0

Patch Changes

  • ec189ad: Fix crash when css-loader failed.
  • 5099d89: Support common in query.

0.0.6

Patch Changes

  • 7f8a4fe: Support Rspack v1.1.0.
  • Updated dependencies [84e49f5]
  • Updated dependencies [f1ddb5a]
  • Updated dependencies [d05e60b]
    • @lynx-js/template-webpack-plugin@0.1.0