sapper-blog-template
sapper-blog-template copied to clipboard
Updating rollup.config.js and dependencies
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:
-
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)
-
Some dependencies are outdated
that could be solved taking really simple steps (not more than 2 minutes or so).
Proposed solution
-
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)
-
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),
}),
- 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