Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

Commit 0846a4c

Browse files
committed
fix(webpack5): support babelInclude
1 parent 98bac24 commit 0846a4c

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

‎packages/plugin-webpack5-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alicloud/console-toolkit-plugin-webpack5-react",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"description": "console toolkit plugin for base react app",
55
"main": "lib/index.js",
66
"scripts": {

‎packages/plugin-webpack5-react/src/types/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ interface BreezrReactOptions {
4444
disableExtractText?: boolean;
4545
disableUglify?: boolean;
4646
disableReactHotLoader?: boolean;
47+
babelInclude?: Webpack.RuleSetCondition;
4748
babelExclude?: Webpack.RuleSetCondition;
4849
babelPluginWindRc?: boolean;
4950
babelUseBuiltIns?: boolean;

‎packages/plugin-webpack5-react/src/webpack/common.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export const common = (config: Chain, options: BreezrReactOptions = defaultOptio
5656
bail,
5757
status,
5858
disableReactHotLoader,
59+
babelInclude,
5960
babelExclude,
6061
babelPluginWindRc,
6162
babelPluginWindIntl,
@@ -147,6 +148,7 @@ export const common = (config: Chain, options: BreezrReactOptions = defaultOptio
147148
reactCssModulesContext: src,
148149
// 只有在构建的时候才开启转义,否则 .mjs 被转义后,会导致 ReactHotLoader 中兼容 esModule 的方法失效,抛出异常:module is not defined
149150
es5ImcompatibleVersions: env.isProd() && (es5ImcompatibleVersions || es5IncompatibleVersions),
151+
include: babelInclude,
150152
exclude: babelExclude,
151153
windRc: babelPluginWindRc,
152154
useBuiltIns: babelUseBuiltIns,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /