sveltejs / template-webpack

Template for building basic Svelte applications with webpack
304 stars 119 forks source link

Error: Can't resolve css file #5

Closed philimonov-alexander closed 6 years ago

philimonov-alexander commented 6 years ago

With emitCss: true options emited css files are not founded. It seems that the problem is related to https://github.com/sveltejs/svelte-loader/issues/45 "the CSS is written to a virtual file system" NodeJs version: 8.11 OS: Windows 10

ERROR in ./src/App.html
Module not found: Error: Can't resolve 'C:sveltesrcApp.svelte.css' in 'C:\svelte\src'
 @ ./src/App.html 71:0-38
 @ ./src/main.js
 @ multi ./src/main.js
thewindsword commented 6 years ago

It look like a path problem on Windows 10,you can see this pr. https://github.com/sveltejs/svelte-loader/pull/64

if you want to build immediately,open node_modules\svelte-loader\index.js change lines 121: cssFilepath to posixify(cssFilepath)

philimonov-alexander commented 6 years ago

Thanks, https://github.com/sveltejs/svelte-loader/pull/64 fix it