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.

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 12,159评论 0 10
  • 面对着来来往往行色匆匆的行人,我在人潮涌动中前行 看似与他们融为一体,实则心里有一片天地, 赏花、听雨、望山、煮茶...
    黄小尔牙阅读 1,813评论 0 0
  • 蔡垒磊,人称蔡叔,是公众号“蚂蚁私塾”的创始人,还是高智商协会“胜寒”“门萨”双会员,具有深度认知,提出的观点往往...
    _巫巫欣阅读 2,806评论 0 1