css/style/sass-loader区别

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 条评论
登录 后参与评论

扫码关注云+社区

领取腾讯云代金券