-
Notifications
You must be signed in to change notification settings - Fork 76
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
Todomvc svelte cleanup #324
Todomvc svelte cleanup #324
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting that these simple changes make the app so much faster. Looks like that using idiomatic structures helps svelte compile the app to more efficient code.
Should you regenerate the complex version of svelte too?
Small request: can you add
watch: {
clearScreen: false,
}
to the rollup config
so that npm run dev
keeps the server URL displayed?
Thanks :-)
@@ -11,7 +11,7 @@ | |||
"build": "rollup -c", | |||
"watch": "rollup -c -w", | |||
"serve": "http-server ./dist -p 7002 -c-1 --cors", | |||
"dev": "npm run serve & npm run watch" | |||
"dev": "npm run serve & npm run watch --no-watch.clearScreen" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@julienw - let me know if this works for you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this works but what is the advantage compared to adding it to the config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it threw an error for me 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very weird because this worked for me:
diff --git a/resources/todomvc/architecture-examples/svelte/rollup.config.js b/resources/todomvc/architecture-examples/>
index b9bf6c67..4c1f9c26 100644
--- a/resources/todomvc/architecture-examples/svelte/rollup.config.js
+++ b/resources/todomvc/architecture-examples/svelte/rollup.config.js
@@ -12,16 +12,19 @@ const production = !process.env.ROLLUP_WATCH;
export default {
input: "src/index.js",
output: {
file: "dist/app.js",
format: "iife",
sourcemap: true,
name: "app",
},
+ watch: {
+ clearScreen: false,
+ },
plugins: [
css({
minify: true,
}),
svelte({
include: "src/**/*.svelte",
}),
resolve({
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe it took a while for the coffee to kick in, but I moved it in the config and it works of course.
@@ -10,7 +10,6 @@ | |||
"devDependencies": { | |||
"big-dom-generator": "file:../../big-dom-generator", | |||
"http-server": "^14.1.1", | |||
"jsdom": "^22.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lpardosixtosMs - this change happened when I ran npm install, to be able to rebuild the new svelte version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is okay. We've removed jsdom as a devDependency in package.json. I was using npm ci which doesn't update the lock files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes me think that we probably want npm install
and not npm ci
when updating the complex versions. Indeed we might run into problems when adding dependencies to the big-dom-generator. It would be good to double check.
Some cleanup items from this pr: tastejs/todomvc#2194
Since the changes are coming directly from the Svelte team, it would be beneficial to align.
three items I didn't carry over to Speedometer:
scores
chrome before:
chrome after:
safari before:
safari after:
firefox before:
firefox after:
edge before:
edge after:
@kara