taro icon indicating copy to clipboard operation
taro copied to clipboard

webpack使用externals 不生效

Open Sunny-CZH opened this issue 1 year ago • 0 comments

相关平台

微信小程序

小程序基础库: 4 使用框架: React

复现步骤

webpackChain(chain) { chain.merge({ externals: [ "native-sdk", (context, request, callback) => { callback(); }, ], }); },

期望结果

externals忽略生效

实际结果

externals 不能忽略插件

环境信息

Taro CLI 3.6.30 environment info:
    System:
      OS: macOS 14.3
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 16.18.1 - ~/.nvm/versions/node/v16.18.1/bin/node
      Yarn: 1.22.19 - /usr/local/bin/yarn
      npm: 8.19.2 - ~/.nvm/versions/node/v16.18.1/bin/npm
    npmPackages:
      @tarojs/cli: 3.6.30 => 3.6.30 
      @tarojs/components: 3.6.30 => 3.6.30 
      @tarojs/helper: 3.6.30 => 3.6.30 
      @tarojs/plugin-framework-react: 3.6.30 => 3.6.30 
      @tarojs/plugin-platform-alipay: 3.6.30 => 3.6.30 
      @tarojs/plugin-platform-h5: 3.6.30 => 3.6.30 
      @tarojs/plugin-platform-jd: 3.6.30 => 3.6.30 
      @tarojs/plugin-platform-qq: 3.6.30 => 3.6.30 
      @tarojs/plugin-platform-swan: 3.6.30 => 3.6.30 
      @tarojs/plugin-platform-tt: 3.6.30 => 3.6.30 
      @tarojs/plugin-platform-weapp: 3.6.30 => 3.6.30 
      @tarojs/react: 3.6.30 => 3.6.30 
      @tarojs/runtime: 3.6.30 => 3.6.30 
      @tarojs/shared: 3.6.30 => 3.6.30 
      @tarojs/taro: 3.6.30 => 3.6.30 
      @tarojs/taro-loader: 3.6.30 => 3.6.30 
      @tarojs/webpack5-runner: 3.6.30 => 3.6.30 
      babel-preset-taro: 3.6.30 => 3.6.30 
      eslint-config-taro: 3.6.30 => 3.6.30 
      react: ^18.0.0 => 18.3.1 
    npmGlobalPackages:
      typescript: 5.3.2

Sunny-CZH avatar Aug 07 '24 12:08 Sunny-CZH