Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Identifier directly after number #695

Closed
korywka opened this issue May 15, 2019 · 9 comments
Closed

Identifier directly after number #695

korywka opened this issue May 15, 2019 · 9 comments

Comments

@korywka
Copy link

korywka commented May 15, 2019

  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

@korywka
Copy link
Author

korywka commented May 15, 2019

node: v12.1.0
npm: 6.9.0

@maxmilton
Copy link

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"

@Conduitry
Copy link
Member

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.

@Conduitry
Copy link
Member

@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.

@lukastaegert
Copy link
Contributor

Yes, a small repro would be highly appreciated.

@maxmilton
Copy link

maxmilton commented May 15, 2019

I've created an issue over at rollup/rollup#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.

@Conduitry
Copy link
Member

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.

@lukastaegert
Copy link
Contributor

Can someone confirm if this issue is fixed with rollup@1.12.1?

@Conduitry
Copy link
Member

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

aaronkahlhamer added a commit to aaronkahlhamer/hammer that referenced this issue May 17, 2019
aaronkahlhamer added a commit to aaronkahlhamer/hammer that referenced this issue May 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants