您好,欢迎来到伴沃教育。
搜索
您的当前位置:首页webpack loader加载顺序

webpack loader加载顺序

来源:伴沃教育

今天起server的时候发现,scss加载报错,仔细检查发现是loader顺序写错了,贴一个官网的例子:

require("!style!css!less!bootstrap/less/bootstrap.less");

//=> the file "bootstrap.less" in the folder "less" in the "bootstrap"

//module (that is installed from github to "node_modules") is

//transformed by the "less-loader". The result is transformed by the

//"css-loader" and then by the "style-loader".

//If configuration has some transforms bound to the file, they will not be applied.

写的很明确了,加载顺序是从后向前,比如要加载scss文件,要把scss写在最后

Copyright © 2019- bangwoyixia.com 版权所有 湘ICP备2023022004号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务