taro prebundle enable: false 无效

6za6bjd0  于 2022-10-27  发布在  其他
关注(0)|答案(2)|浏览(314)

相关平台

字节跳动小程序

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

复现步骤

init 一个3.5.7的模板 我选择的是taro-hooks 的template, 然后配置

const config = {
  compiler: {
    prebundle: {
      type: 'webpack5',
      enable: false
    }
  },
}}

执行npm run dev:tt

期望结果

不会prebundle

实际结果

还是会打包prebundle 并放入.taro缓存中 (主要是想用来调试下taro运行时的代码,目前prebundle后不太好修改后更新)

环境信息

👽 Taro v3.5.7

  Taro CLI 3.5.7 environment info:
    System:
      OS: macOS 10.15.5
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 14.19.2 - ~/.nvm/versions/node/v14.19.2/bin/node
      Yarn: 1.22.18 - ~/.nvm/versions/node/v14.19.2/bin/yarn
      npm: 8.19.2 - ~/.nvm/versions/node/v14.19.2/bin/npm
    npmPackages:
      @tarojs/cli: ^3.5.7 => 3.5.7 
      @tarojs/components: 3.5.7 => 3.5.7 
      @tarojs/helper: 3.5.7 => 3.5.7 
      @tarojs/plugin-framework-react: 3.5.7 => 3.5.7 
      @tarojs/plugin-platform-alipay: 3.5.7 => 3.5.7 
      @tarojs/plugin-platform-jd: 3.5.7 => 3.5.7 
      @tarojs/plugin-platform-qq: 3.5.7 => 3.5.7 
      @tarojs/plugin-platform-swan: 3.5.7 => 3.5.7 
      @tarojs/plugin-platform-tt: 3.5.7 => 3.5.7 
      @tarojs/plugin-platform-weapp: 3.5.7 => 3.5.7 
      @tarojs/react: 3.5.7 => 3.5.7 
      @tarojs/router: 3.5.7 => 3.5.7 
      @tarojs/runtime: 3.5.7 => 3.5.7 
      @tarojs/shared: 3.5.7 => 3.5.7 
      @tarojs/taro: 3.5.7 => 3.5.7 
      @tarojs/taro-h5: 3.5.7 => 3.5.7 
      @tarojs/webpack5-runner: 3.5.7 => 3.5.7 
      babel-preset-taro: 3.5.7 => 3.5.7 
      eslint-config-taro: 3.5.7 => 3.5.7 
      react: ^18.0.0 => 18.2.0
3wabscal

3wabscal1#

@jianjiachenghub 配置写错了吧

compiler: {
  type: 'webpack5',
  prebundle: {
    enable: false
  }
}
bvjxkvbb

bvjxkvbb2#

type: 'webpack5',
  prebundle: {
    enable: false
  }

@Chen-jj 都不行的 最开始都没有配置那个type

相关问题