Sapper: Identifier directly after number

Created on 15 May 2019  Â·  9Comments  Â·  Source: sveltejs/sapper

  1. npx degit sveltejs/sapper-template#rollup my-app
  2. cd my-app
  3. npm install
  4. npm run dev
✗ client
src/routes/_layout.css (1:13)
Identifier directly after number (Note that you need plugins to import files that are not JavaScript)
1: main.svelte-1uhnsl8{position:relative;max-width:56em;background-color:white;padding:2em;margin:0 auto;box-sizing:border-box}

✔ server (681ms)

http://localhost:3000/

This site can’t be reached

All 9 comments

node: v12.1.0
npm: 6.9.0

Might be related to the recent rollup v1.12.0 release. I've had apps breaking after updating too.

You can either hold up for a bit until a patch is released or try pinning the version in your package.json to:

"rollup": "1.11.3"

Switching to Rollup 1.11 does make this issue go away for me. It seems likely this is a bug in 1.12 but I'm not sure what it is really.

@MaxMilton If you're able to use one of your other apps to create a small repro that you can post as a Rollup issue, that would be much appreciated. There doesn't seem to have been an issue opened there yet about this.

Yes, a small repro would be highly appreciated.

I've created an issue over at https://github.com/rollup/rollup/issues/2859

At this point I'm not sure what's breaking exactly (it may actually be a rollup plugin) but I'll try to create a minimal repro and post back to that issue.

I've been trying to dig into why this is happening by poking around at the Sapper build, and basically all I've realized is that I have no idea how the CSS extraction with rollup-plugin-svelte was working under Rollup 1.11. At the bottom of each compiled component, a corresponding import "/path/to/component.css" is generated, and loading this virtual CSS file is handled via a lookup table that's referred to in resolveId and load but I can't see what was stopping Rollup from attempting to parse and process that CSS as JS, which is what's happening now in 1.12.

Can someone confirm if this issue is fixed with [email protected]?

Yep, just came here to close this issue. Looks good with 1.12.1. Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nolanlawson picture nolanlawson  Â·  4Comments

Snugug picture Snugug  Â·  4Comments

mylastore picture mylastore  Â·  3Comments

BMorearty picture BMorearty  Â·  3Comments

antony picture antony  Â·  3Comments