Skip to content
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

Updating rollup.config.js and dependencies #37

Open
jigth opened this issue Oct 5, 2021 · 0 comments
Open

Updating rollup.config.js and dependencies #37

jigth opened this issue Oct 5, 2021 · 0 comments

Comments

@jigth
Copy link

jigth commented Oct 5, 2021

Hello @Charca,

I just clonned your sapper-blog-template and also deployed it in Netlify, It looks great to me, but I saw a few problems during the installation:

  1. For some package managers such as PNPM and YARN, your current version doesn't run out of the box, but it throws some errors (for npm it starts correctly)

  2. Some dependencies are outdated

that could be solved taking really simple steps (not more than 2 minutes or so).

Proposed solution

  1. Update the version of the "rollup-plugin-svelte" to "6.1.1" (7.0.0 and later didn't work for me with this project)

  2. Add the following attribute to the file rollup.config.js into all the "replace" blocks (located in client, server, serviceWorker)

    preventAssignment: true

The resultant block should look like this

replace({
    preventAssignment: true,
    "process.browser": true,
    "process.env.NODE_ENV": JSON.stringify(mode),
}),
  1. Reinstall node_modules and run npm audit fix to update dependencies

After Following those steps, your blog template is working correctly for the most popular package managers, no warnings, no errors.

If you want, you can check and apply those changes implemented in a repo in my other Github account

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

1 participant