We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
微信小程序
小程序基础库: 2.27.3 使用框架: React
在 config/index.js 中同时配置 mini.compile.exclude 和 mini.compile.include,只有 mini.compile.exclude 生效。
config/index.js
mini.compile.exclude
mini.compile.include
相关代码:https://github.com/NervJS/taro/blob/523bf1b8b31b6f0aebc714db6da9e6ae2dc0db56/packages/taro-mini-runner/src/webpack/chain.ts#L395C2-L406C4
if (compile.exclude && compile.exclude.length) { scriptRule.exclude = [ ...compile.exclude, filename => /css-loader/.test(filename) || (/node_modules/.test(filename) && !(/taro/.test(filename))) ] } else if (compile.include && compile.include.length) { scriptRule.include = [ ...compile.include, sourceDir, filename => /taro/.test(filename) ] } else { scriptRule.exclude = [filename => /css-loader/.test(filename) || (/node_modules/.test(filename) && !(/taro/.test(filename)))] }
此处的 else if 判断感觉不太合理
期望 mini.compile.exclude 和 mini.compile.include 能够同时生效
当同时配置时,仅 mini.compile.exclude 生效
👽 Taro v3.6.17 REQUEST_ENV: production envFlag: isBuild: true basename: /mp publicPath: xxx Taro CLI 3.6.17 environment info: System: OS: macOS 13.6.1 Shell: 5.9 - /bin/zsh Binaries: Node: 16.20.0 - ~/.nvm/versions/node/v16.20.0/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v16.20.0/bin/yarn npm: 8.19.4 - ~/.nvm/versions/node/v16.20.0/bin/npm npmPackages: @tarojs/components: ~3.6.17 => 3.6.17 @tarojs/mini-runner: ~3.6.17 => 3.6.17 @tarojs/plugin-framework-react: ~3.6.17 => 3.6.17 @tarojs/react: ~3.6.17 => 3.6.17 @tarojs/runtime: ~3.6.17 => 3.6.17 @tarojs/service: ~3.6.17 => 3.6.17 @tarojs/taro: ~3.6.17 => 3.6.17 @tarojs/webpack-runner: ~3.6.17 => 3.6.17 babel-preset-taro: ~3.6.17 => 3.6.17 react: ^17.0.0 => 17.0.2
The text was updated successfully, but these errors were encountered:
Awesome, thanks!
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
相关平台
微信小程序
小程序基础库: 2.27.3
使用框架: React
复现步骤
在
config/index.js
中同时配置mini.compile.exclude
和mini.compile.include
,只有mini.compile.exclude
生效。相关代码:https://github.com/NervJS/taro/blob/523bf1b8b31b6f0aebc714db6da9e6ae2dc0db56/packages/taro-mini-runner/src/webpack/chain.ts#L395C2-L406C4
此处的 else if 判断感觉不太合理
期望结果
期望
mini.compile.exclude
和mini.compile.include
能够同时生效实际结果
当同时配置时,仅
mini.compile.exclude
生效环境信息
The text was updated successfully, but these errors were encountered: