sveltejs/svelte-loader

Error: Module parse failed: Unexpected token

valqelyan opened this issue · 3 comments

I used this template https://github.com/sveltejs/template-webpack provided by svelte
After installing svelte-grid webpack logs error
image

image
don't know what could be wrong with this line

https://github.com/vaheqelyan/svelte-grid/blob/master/src/index.svelte#L107

REPO https://github.com/vaheqelyan/svelte-grid-webpack-template

You’ll need to set up Babel through babel-loader I think, or use Webpack 5. IIRC Webpack 4 doesn’t support the ?. syntax.

did so, unfortunately..
image
#137 (comment) solving the issue for me

closing this. the error is not related to svelte-loader