Skip to content
New issue

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

3.0.5编译H5报错 ,配置 localIdentName出错 #7380

Closed
cdd111 opened this issue Aug 19, 2020 · 1 comment
Closed

3.0.5编译H5报错 ,配置 localIdentName出错 #7380

cdd111 opened this issue Aug 19, 2020 · 1 comment
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x

Comments

@cdd111
Copy link

cdd111 commented Aug 19, 2020

相关平台

H5

浏览器版本: 微信开发者工具 版本1.03.2006090
使用框架: React

复现步骤

在h5下配置
cssLoaderOption: {
// localIdentName:' [path][name].[hash:base64]'
// },

期望结果

编译不出错

实际结果

编译出错,报错如下:

Module build failed (from ./node_modules/@tarojs/webpack-runner/node_modules/css-loader/dist/cjs.js):
ValidationError: Invalid options object. CSS Loader has been initialized using an options object that does not match the API schema.

  • options has an unknown property 'localIdentName'. These properties are valid:
    object { url?, import?, modules?, sourceMap?, importLoaders?, localsConvention?, onlyLocals?, esModule? }

error Command failed with exit code 1.

环境信息

👽 Taro v3.0.5

------------------------------------------------
undefined
------------------------------------------------

  Taro CLI 3.0.5 environment info:
    System:
      OS: macOS 10.14.3
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.15.2 - /usr/local/bin/node
      Yarn: 1.19.1 - /usr/local/bin/yarn
      npm: 6.4.1 - /usr/local/bin/npm
    npmPackages:
      @tarojs/components: ^3.0.5 => 3.0.7 
      @tarojs/mini-runner: ^3.0.5 => 3.0.7 
      @tarojs/react: ^3.0.5 => 3.0.7 
      @tarojs/runtime: ^3.0.5 => 3.0.7 
      @tarojs/taro: ^3.0.5 => 3.0.7 
      @tarojs/webpack-runner: ^3.0.5 => 3.0.7 
      babel-preset-taro: ^3.0.5 => 3.0.7 
      eslint-config-taro: ^3.0.5 => 3.0.7 
      react: ^16.13.1 => 16.13.1
@taro-bot2 taro-bot2 bot added F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x labels Aug 19, 2020
@Chen-jj Chen-jj added this to the 3.0.10 milestone Sep 3, 2020
@Chen-jj Chen-jj modified the milestones: 3.0.10, 3.0.11 Sep 10, 2020
@ZakaryCode ZakaryCode modified the milestones: 3.0.11, 3.0.12 Sep 18, 2020
@Chen-jj Chen-jj modified the milestones: 3.0.15, 3.0.16 Oct 23, 2020
@Chen-jj
Copy link
Contributor

Chen-jj commented Nov 5, 2020

@cdd111 你参数写错了,少套了一层 moduleshttps://github.com/webpack-contrib/css-loader

image

@Chen-jj Chen-jj closed this as completed Nov 5, 2020
@Chen-jj Chen-jj removed this from the 3.0.16 milestone Nov 5, 2020
@ZakaryCode ZakaryCode added this to H5 Apr 10, 2023
@ZakaryCode ZakaryCode moved this to Done in H5 Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Archived in project
Development

No branches or pull requests

3 participants