Skip to content

CRLF line endings causes svelte-loader to fail to compile await blocks correctly. #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bryanwood opened this issue Dec 29, 2017 · 1 comment

Comments

@bryanwood
Copy link
Contributor

If you have a component .html source file that has CRLF line endings with an {{#await}} block when compiled with svelte-loader you will get an error like this:

ERROR in ./example.html
Module parse failed: Unexpected token (86:3)
You may need an appropriate loader to handle this file type.
|
  // (2:{{then result}}ing</p>
| function create_pending_block(state, _, component) {
|       var p;
|
 @ ./index.js 1:0-37

Error doesn't occur when line endings are switched to LF.

I've made a repository with an example:
https://github.com/bryanwood/svelte-crlf-await-block

Can workaround this by using LF for line endings.

svelte version: 1.49.3
svelte-loader version: 2.3.2
webpack version: 3.10.0

@Conduitry
Copy link
Member

Tidying up - this was actually a problem in Svelte itself sveltejs/svelte#1132 and has been fixed since version 1.54 in January

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants