今天起server的時(shí)候發(fā)現(xiàn),scss加載報(bào)錯(cuò),仔細(xì)檢查發(fā)現(xiàn)是loader順序?qū)戝e(cuò)了,貼一個(gè)官網(wǎng)的例子:
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寫在最后