css/style/sass-loader区别

2019-08-15 18:52:09 浏览数 (1)

css-loader——translates CSS into CommonJS

The css-loader interprets @import and url() like import/require() and will resolve them.

style-loader——creates style nodes from JS strings

Adds CSS to the DOM by injecting a <style> tag

sass-loader——compiles Sass to CSS, using Node Sass by default

Loads a Sass/SCSS file and compiles it to CSS. Use the css-loader or the raw-loader to turn it into a JS module and the MiniCssExtractPlugin to extract it into a separate file.

0 人点赞