Webpack 4: SCSS to CSS into separate file

前端 未结 2 391
名媛妹妹
名媛妹妹 2021-02-07 19:27

I would like to use Webpack 4 to transpile on one side my ES6 Javascript separately from my Sass:

  • src/js/index.js → static/js/index.js
  • src/css/style.scss
2条回答
  •  有刺的猬
    2021-02-07 20:09

    extract-text-webpack-plugin does not play well with webpack 4.

    According to Michael Ciniawsky:

    extract-text-webpack-plugin reached a point where maintaining it become too much of a burden and it’s not the first time upgrading a major webpack version was complicated and cumbersome due to issues with it

    mini-css-extract-plugin is here to overcome those issues.

    see here for more information about this topic

提交回复
热议问题