Skip to content

baseLevel设置了,页面没有变化,不知道是否生效 #16505

@william-LK

Description

@william-LK

相关平台

微信小程序

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

复现步骤

由于公司小程序交互较为复杂,一直希望有性能优化,看官方文档可以设置baselevel来提升,所以设置成baselevel:8来尝试,但设置后页面没有变化,不知道是没生效,还是已生效,想请问我的配置是否正确,或者如果正确如何能查看是否已经生效

期望结果

有提示是否已开启baselevel

实际结果

没有办法对比

环境信息

👽 Taro v3.6.24


  Taro CLI 3.6.24 environment info:
    System:
      OS: macOS 13.0
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
      Yarn: 1.22.19 - /usr/local/bin/yarn
      npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm
    npmPackages:
      @tarojs/cli: 3.6.31 => 3.6.31 
      @tarojs/components: 3.6.31 => 3.6.31 
      @tarojs/helper: 3.6.31 => 3.6.31 
      @tarojs/mini-runner: 3.6.31 => 3.6.31 
      @tarojs/plugin-framework-react: 3.6.31 => 3.6.31 
      @tarojs/plugin-platform-weapp: 3.6.31 => 3.6.31 
      @tarojs/react: 3.6.31 => 3.6.31 
      @tarojs/runtime: 3.6.31 => 3.6.31 
      @tarojs/shared: 3.6.31 => 3.6.31 
      @tarojs/taro: 3.6.31 => 3.6.31 
      @tarojs/webpack5-runner: 3.6.31 => 3.6.31 
      babel-preset-taro: 3.6.31 => 3.6.31 
      eslint-config-taro: 3.6.31 => 3.6.31 
      react: 18.2.0 => 18.2.0 

补充信息

  mini: {
    baseLevel: 8,
    webpackChain(chain, webpack) {
      chain.resolve.alias.set("moment", "dayjs");
      chain.resolve.alias.set("lodash-es", "lodash");
      chain.resolve.alias.set("react-color", false);
      chain.resolve.alias.set("@leyaoyao/taro-icon", false);

      process.env.TARO_APP_ANALYZER && chain
        .plugin("analyzer")
        .use(require("webpack-bundle-analyzer").BundleAnalyzerPlugin, []);
    },
    postcss: {
      pxtransform: {
        enable: true,
        config: {},
      },
      url: {
        enable: true,
        config: {
          limit: 1024, // 设定转换尺寸上限
        },
      },
      cssModules: {
        enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
        config: {
          namingPattern: "module", // 转换模式,取值为 global/module
          generateScopedName: "[name]__[local]___[hash:base64:5]",
        },
      },
    },

    compile: {
      include: [
        (filename) =>
          /react-sortablejs|@leyaoyao|mobile-component|starui-react-taro/.test(
            filename
          ),
      ],
    },
  },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions