Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

Rollup variant of the sapper template is broken since @rollup/[email protected] was released #211

Closed
bryanwood opened this issue Apr 12, 2020 · 1 comment

Comments

@bryanwood
Copy link

bryanwood commented Apr 12, 2020

A fresh degit of the template since @rollup/[email protected] was released results in the following:

C:\projects>npx degit sveltejs/sapper-template#rollup my-app
>> cd my-app
>> npm install
>> npm run dev
npx: installed 1 in 1.297s
> cloned sveltejs/sapper-template#rollup to my-app
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.

added 271 packages from 199 contributors and audited 2224 packages in 6.095s

19 packages are looking for funding
  run `npm fund` for details

found 1 moderate severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details

> [email protected] dev C:\projects\my-app
> sapper dev

✗ client
'import' and 'export' may only appear at the top level
11: }
12:
13: export function connect(port) {
    ^
14:   if (source || !window.EventSource) return;
✔ server (806ms)
✔ service worker (189ms)
> Listening on http://localhost:3001

Pinning @rollup/plugin-commonjs to 11.0.2 resolves it.

Possibly relevant commits from @rollup/plugin-commonjs:

@Conduitry
Copy link
Member

Closing in favor of sveltejs/sapper#1151 which has more discussion, but it does seem like this is probably something that needs to be fixed in the Rollup plugin.

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

2 participants