stylex-webpack 0.4.3 → 0.4.4

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ var process = require('node:process');
6
6
  var VirtualModulesPlugin = require('webpack-virtual-modules');
7
7
  var identity = require('foxts/identity');
8
8
 
9
- var version = "0.4.3";
9
+ var version = "0.4.4";
10
10
 
11
11
  const PLUGIN_NAME = 'stylex';
12
12
  const VIRTUAL_ENTRYPOINT_CSS_PATH = require.resolve('./stylex.css');
@@ -124,7 +124,7 @@ class StyleXPlugin {
124
124
  name: PLUGIN_NAME,
125
125
  stage: Compilation.PROCESS_ASSETS_STAGE_PRE_PROCESS
126
126
  }, async (assets)=>{
127
- if (this.loaderOption.nextjsMode) {
127
+ if (this.loaderOption.nextjsMode && this.loaderOption.nextjsAppRouterMode) {
128
128
  // Collect stylex rules from module instead of self maintained map
129
129
  // on previous step, we create a "stylex" chunk to hold all virtual stylex css
130
130
  // the chunk contains all css chunks generated by mini-css-extract-plugin
@@ -164,7 +164,7 @@ class StyleXPlugin {
164
164
  return;
165
165
  }
166
166
  const finalCss = await this.transformCss(stylexCSS);
167
- if (compiler.options.mode === 'development' && this.loaderOption.nextjsAppRouterMode) {
167
+ if (compiler.options.mode === 'development' && this.loaderOption.nextjsMode && this.loaderOption.nextjsAppRouterMode) {
168
168
  // In development mode, a.k.a. HMR
169
169
  /**
170
170
  * Now we write final CSS to virtual module, which acts like `stylex-webpack/stylex.css` has been
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stylex-webpack",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "The another Webpack Plugin for Facebook's StyleX",
5
5
  "homepage": "https://github.com/SukkaW/style9-webpack#readme",
6
6
  "repository": {