美文网首页
css/style/sass-loader区别

css/style/sass-loader区别

作者: 杨肆月 | 来源:发表于2018-08-10 15:33 被阅读106次

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.

相关文章

网友评论

      本文标题:css/style/sass-loader区别

      本文链接:https://www.haomeiwen.com/subject/byokbftx.html