@lynx-js/react-refresh-webpack-plugin-canary 0.3.3 → 0.3.4-canary-20250709-d513dd9f

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lynx-js/react-refresh-webpack-plugin
2
2
 
3
+ ## 0.3.4-canary-20250709062559-d513dd9fb7ee950f36aaaee0d62ede8072f7b031
4
+
5
+ ### Patch Changes
6
+
7
+ - Should apply the plugin when using `mode: 'development'` with `NODE_ENV=production`. ([#1253](https://github.com/lynx-family/lynx-stack/pull/1253))
8
+
3
9
  ## 0.3.3
4
10
 
5
11
  ### Patch Changes
@@ -84,8 +84,9 @@ export class ReactRefreshRspackPlugin {
84
84
  * @param compiler - the rspack compiler
85
85
  */
86
86
  apply(compiler) {
87
- if (process.env['NODE_ENV'] === 'production'
88
- || compiler.options.mode === 'production') {
87
+ const isDev = process.env['NODE_ENV'] === 'development'
88
+ || compiler.options.mode === 'development';
89
+ if (!isDev) {
89
90
  return;
90
91
  }
91
92
  const { ProvidePlugin } = compiler.webpack;
@@ -68,8 +68,9 @@ export class ReactRefreshWebpackPlugin {
68
68
  * @param compiler - the webpack compiler
69
69
  */
70
70
  apply(compiler) {
71
- if (process.env['NODE_ENV'] === 'production'
72
- || compiler.options.mode === 'production') {
71
+ const isDev = process.env['NODE_ENV'] === 'development'
72
+ || compiler.options.mode === 'development';
73
+ if (!isDev) {
73
74
  return;
74
75
  }
75
76
  const { EntryPlugin, ProvidePlugin, RuntimeGlobals, RuntimeModule, } = compiler.webpack;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/react-refresh-webpack-plugin-canary",
3
- "version": "0.3.3",
3
+ "version": "0.3.4-canary-20250709-d513dd9f",
4
4
  "description": "A webpack plugin to hot refresh for Lynx.",
5
5
  "keywords": [
6
6
  "webpack",
@@ -35,12 +35,12 @@
35
35
  ],
36
36
  "devDependencies": {
37
37
  "@microsoft/api-extractor": "7.52.8",
38
- "@rspack/core": "1.3.11",
38
+ "@rspack/core": "1.4.5",
39
39
  "swc-loader": "^0.2.6",
40
40
  "webpack": "^5.99.9",
41
+ "@lynx-js/react": "npm:@lynx-js/react-canary@0.111.1-canary-20250709-d513dd9f",
41
42
  "@lynx-js/react-refresh": "0.1.0",
42
- "@lynx-js/react-webpack-plugin": "npm:@lynx-js/react-webpack-plugin-canary@0.6.14",
43
- "@lynx-js/react": "npm:@lynx-js/react-canary@0.109.0",
43
+ "@lynx-js/react-webpack-plugin": "npm:@lynx-js/react-webpack-plugin-canary@0.6.18",
44
44
  "@lynx-js/test-tools": "0.0.0"
45
45
  },
46
46
  "peerDependencies": {