Since 3.0.0 version get "Error: Cannot find module" when using file paths with '~'
Hie! This is my project https://github.com/g1un/path-resolve-issue I added "src/fonts" to my resolve.modules in webpack.config.js (https://github.com/g1un/path-resolve-issue/blob/test/webpack.config.js#L33) and tried to use fonts with path with '~' (https://github.com/g1un/path-resolve-issue/blob/test/src/scss/components/_fonts.scss#L4). It works with [email protected], but do not with [email protected], giving:
ERROR in ./src/scss/style.scss
Module build failed (from ./node_modules/extract-loader/lib/extractLoader.js):
/Users/ilyasmal/work/bogdanovka/node_modules/resolve/lib/sync.js:45
throw err;
^
Error: Cannot find module 'roboto-light.woff2' from '/Users/ilyasmal/work/bogdanovka/src/scss'
at Function.module.exports [as sync] (/Users/ilyasmal/work/bogdanovka/node_modules/resolve/lib/sync.js:43:15)
at /Users/ilyasmal/work/bogdanovka/node_modules/extract-loader/lib/extractLoader.js:100:60
at require (/Users/ilyasmal/work/bogdanovka/node_modules/extract-loader/lib/extractLoader.js:93:86)
at /Users/ilyasmal/work/bogdanovka/src/scss/style.scss:7:8341
at ContextifyScript.Script.runInContext (vm.js:59:29)
at ContextifyScript.Script.runInNewContext (vm.js:65:15)
at /Users/ilyasmal/work/bogdanovka/node_modules/extract-loader/lib/extractLoader.js:132:20
at Generator.next (<anonymous>)
at step (/Users/ilyasmal/work/bogdanovka/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /Users/ilyasmal/work/bogdanovka/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14
at new Promise (<anonymous>)
at new F (/Users/ilyasmal/work/bogdanovka/node_modules/core-js/library/modules/_export.js:36:28)
at /Users/ilyasmal/work/bogdanovka/node_modules/babel-runtime/helpers/asyncToGenerator.js:14:12
at evalModule (/Users/ilyasmal/work/bogdanovka/node_modules/extract-loader/lib/extractLoader.js:150:63)
at evalDependencyGraph (/Users/ilyasmal/work/bogdanovka/node_modules/extract-loader/lib/extractLoader.js:152:12)
at Object.<anonymous> (/Users/ilyasmal/work/bogdanovka/node_modules/extract-loader/lib/extractLoader.js:32:31)
@ ./src/js/app.js 3:0-30
@ ./src/js/dev.app.js
@ multi (webpack)-dev-server/client?http://0.0.0.0:8080 ./src/js/dev.app.js
Ended up using https://github.com/webpack-contrib/mini-css-extract-plugin. It works with '~' properly.
Also hitting this ATM.
I'm not sure if this error is similar to #48. It seems to be. I submitted a repro example over there.
I am seeing this issue too, and it's with an HTML file so the mins-css-extract-plugin doesn't work :(