index.js

require("./style.css");
document.write(require("./index2.js"));

index2.js

module.exports = "HelloWorld2";

style.css

body {
    background: yellow;
}

dos输入:

webpack index.js bundle.js --module-bind ‘css=style-loader!css-loader’

Js | Cli使用leader报错!!!

报错并不能转换类型!!!

解决办法:

#将单引号转成双引号
webpack index.js bundle.js --module-bind “css=style-loader!css-loader”

Js | Cli使用leader报错!!!
Js | Cli使用leader报错!!!
成功解决!!

相关文章:

  • 2021-10-16
  • 2021-06-26
  • 2021-08-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-09
  • 2022-12-23
猜你喜欢
  • 2021-08-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
相关资源
相似解决方案