Skip to content

Commit

Permalink
Add note about webpack 4. See #7
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldenning committed Apr 12, 2021
1 parent 9233d18 commit 3043032
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -79,6 +79,8 @@ const cssLifecycles = singleSpaCss({

## Webpack Plugin

**This plugin currently only supports webpack 5. See [issue 7](https://github.com/single-spa/single-spa-css/issues/7) to track webpack 4 support.**

single-spa-css exposes a webpack plugin that integrates with [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) to allow you to load CSS files that are extracted and otherwise would not be loaded. The webpack plugin exposes the names of the extracted CSS files to your bundle under the `__webpack_require__.cssAssets` and `__webpack_require__.cssAssetFileName` variables. The `cssAssets` variable contains the name of the webpack chunk, and the `cssAssetFileName` function converts the chunk name into the extracted CSS asset's file name. These can be used manually, or you can specify the `webpackExtractedCss` option in single-spa-css to have it automatically mount and unmount those CSS files.

### Usage
Expand Down

0 comments on commit 3043032

Please sign in to comment.