SassNinja / media-query-plugin

Webpack plugin for media query extraction.
MIT License
205 stars 27 forks source link

Bootstrap Icons SCSS #112

Closed xkzl closed 1 year ago

xkzl commented 1 year ago

Hello, I have in my project a bootstrap-icons.scss that is not properly generated when using media-query-plugin.

Module build failed: Module not found:
"./assets/styles/base.scss.webpack[javascript/auto]!=!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].oneOf[1].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].oneOf[1].use[2]!./node_modules/resolve-url-loader/index.js??ruleSet[1].rules[4].oneOf[1].use[3]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].oneOf[1].use[4]!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./assets/styles/base.scss" contains a reference to the file "./fonts/bootstrap-icons.woff2?24e3eb84d0bcaf83d77f904c78ac1f47".
This file can not be found, please check it for typos or update it if the file got moved.

"./assets/styles/base.scss.webpack[javascript/auto]!=!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].oneOf[1].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].oneOf[1].use[2]!./node_modules/resolve-url-loader/index.js??ruleSet[1].rules[4].oneOf[1].use[3]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].oneOf[1].use[4]!./node_modules/media-query-plugin/src/loader.js!./node_modules/postcss-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./assets/styles/base.scss" contains a reference to the file "./fonts/bootstrap-icons.woff?24e3eb84d0bcaf83d77f904c78ac1f47".
This file can not be found, please check it for typos or update it if the file got moved.

This file exists "./fonts/bootstrap-icons.woff", but the issue comes from the hash in tail of the filename. Is there any reason why this is only showing up media-query-plugin on ? Maybe some specificities in the loaders ?

xkzl commented 1 year ago

I noticed that removing the "sass-loader" line in Encore.addLoader command is "fixing" the issue. This might actually be related to : https://github.com/twbs/icons/issues/1538 ?