@lynx-js/react-webpack-plugin-canary 0.6.10 → 0.6.11-canary-20250417-110c56fc

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,21 @@
1
1
  # @lynx-js/react-webpack-plugin
2
2
 
3
+ ## 0.6.11-canary-20250417085914-110c56fcc6126756b94a01dba81f151035a423ad
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: fully support MTS ([#569](https://github.com/lynx-family/lynx-stack/pull/569))
8
+
9
+ Now use support the following usage
10
+
11
+ - mainthread event
12
+ - mainthread ref
13
+ - runOnMainThread/runOnBackground
14
+ - ref.current.xx
15
+
16
+ - Updated dependencies [[`67bcc47`](https://github.com/lynx-family/lynx-stack/commit/67bcc4731eed0b8a0f97ef54dea03e94c9fe4235), [`c0f06ba`](https://github.com/lynx-family/lynx-stack/commit/c0f06ba2398fcf1a0496c160db6b3d3c471a8937)]:
17
+ - @lynx-js/react@0.106.5-canary-20250417085914-110c56fcc6126756b94a01dba81f151035a423ad
18
+
3
19
  ## 0.6.10
4
20
 
5
21
  ### Patch Changes
@@ -23,7 +39,7 @@
23
39
  - Shake `useImperativeHandle` on the main-thread by default. ([#153](https://github.com/lynx-family/lynx-stack/pull/153))
24
40
 
25
41
  ```js
26
- import { forwardRef, useImperativeHandle } from '@lynx-js/react';
42
+ import { forwardRef, useImperativeHandle } from "@lynx-js/react";
27
43
 
28
44
  export default forwardRef(function App(_, ref) {
29
45
  useImperativeHandle(ref, () => {
@@ -31,7 +47,7 @@
31
47
  return {
32
48
  name() {
33
49
  // This should be considered as background only
34
- console.info('This should not exist in main-thread');
50
+ console.info("This should not exist in main-thread");
35
51
  },
36
52
  };
37
53
  });
@@ -91,14 +107,14 @@
91
107
  - e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
92
108
 
93
109
  ```js
94
- import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin';
95
- import { defineConfig } from '@lynx-js/rspeedy';
110
+ import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
111
+ import { defineConfig } from "@lynx-js/rspeedy";
96
112
 
97
113
  export default defineConfig({
98
114
  plugins: [
99
115
  pluginReactLynx({
100
116
  defineDCE: {
101
- __SOME_FALSE_DEFINE__: 'false',
117
+ __SOME_FALSE_DEFINE__: "false",
102
118
  },
103
119
  }),
104
120
  ],
@@ -110,20 +126,20 @@
110
126
  For example, `import` initialized by dead code will be removed:
111
127
 
112
128
  ```js
113
- import { foo } from 'bar';
129
+ import { foo } from "bar";
114
130
 
115
131
  if (__SOME_FALSE_DEFINE__) {
116
132
  foo();
117
- console.log('dead code');
133
+ console.log("dead code");
118
134
  } else {
119
- console.log('reachable code');
135
+ console.log("reachable code");
120
136
  }
121
137
  ```
122
138
 
123
139
  will be transformed to:
124
140
 
125
141
  ```js
126
- console.log('reachable code');
142
+ console.log("reachable code");
127
143
  ```
128
144
 
129
145
  ## 0.6.0
@@ -133,14 +149,14 @@
133
149
  - a30c83d: Add `compat.removeComponentAttrRegex`.
134
150
 
135
151
  ```js
136
- import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin';
137
- import { defineConfig } from '@lynx-js/rspeedy';
152
+ import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
153
+ import { defineConfig } from "@lynx-js/rspeedy";
138
154
 
139
155
  export default defineConfig({
140
156
  plugins: [
141
157
  pluginReactLynx({
142
158
  compat: {
143
- removeComponentAttrRegex: 'YOUR REGEX',
159
+ removeComponentAttrRegex: "YOUR REGEX",
144
160
  },
145
161
  }),
146
162
  ],
@@ -30,7 +30,7 @@ interface ReactWebpackPluginOptions {
30
30
  */
31
31
  firstScreenSyncTiming?: 'immediately' | 'jsReady';
32
32
  /**
33
- * {@inheritdoc @lynx-dev/react-rsbuild-plugin#PluginReactLynxOptions.enableSSR}
33
+ * {@inheritdoc @lynx-js/react-rsbuild-plugin#PluginReactLynxOptions.enableSSR}
34
34
  */
35
35
  enableSSR?: boolean;
36
36
  /**
@@ -96,7 +96,6 @@ class ReactWebpackPlugin {
96
96
  new EnvironmentPlugin({
97
97
  // Default values of null and undefined behave differently.
98
98
  // Use undefined for variables that must be provided during bundling, or null if they are optional.
99
- NODE_ENV: null,
100
99
  DEBUG: null,
101
100
  }).apply(compiler);
102
101
  new DefinePlugin({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/react-webpack-plugin-canary",
3
- "version": "0.6.10",
3
+ "version": "0.6.11-canary-20250417-110c56fc",
4
4
  "description": "A webpack plugin for ReactLynx",
5
5
  "keywords": [
6
6
  "webpack",
@@ -37,16 +37,16 @@
37
37
  "tiny-invariant": "^1.3.3"
38
38
  },
39
39
  "devDependencies": {
40
- "@microsoft/api-extractor": "7.51.1",
41
- "@rspack/core": "1.3.0-beta.1",
40
+ "@microsoft/api-extractor": "7.52.3",
41
+ "@rspack/core": "1.3.5",
42
42
  "css-loader": "^7.1.2",
43
43
  "swc-loader": "^0.2.6",
44
- "webpack": "^5.98.0",
45
- "@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.6.7",
44
+ "webpack": "^5.99.5",
45
+ "@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.5.3",
46
46
  "@lynx-js/test-tools": "0.0.0",
47
47
  "@lynx-js/vitest-setup": "0.0.0",
48
- "@lynx-js/react": "npm:@lynx-js/react-canary@0.106.2",
49
- "@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.5.2"
48
+ "@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.6.9",
49
+ "@lynx-js/react": "npm:@lynx-js/react-canary@0.106.5-canary-20250417-110c56fc"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@lynx-js/react": "*",