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

Replace Snowpack with Vite #26

Merged
merged 13 commits into from
Jun 18, 2021
Merged

Replace Snowpack with Vite #26

merged 13 commits into from
Jun 18, 2021

Conversation

sebastinez
Copy link
Member

This PR completes #25.

It replaces Snowpack with Vite, which lets us use IDX and ceramic-js for some reason better than Snowpack.

For it to work I had to:

  • Replace all the lang attributes in the svelte script tags from "typescript" to "ts".
  • Create new config files with the necessary configurations to work.

Since I can't compile package-lock.json without getting compile errors in the CI, I commit only package.json.

I tried all the eventual functionality and it is very similar to Snowpack in speed and configuration, to be sure I also tried different operations with IDX and it works like a charm.

@sebastinez sebastinez requested a review from cloudhead as a code owner June 17, 2021 02:41
@sebastinez
Copy link
Member Author

It seems that there is a problem with vite-plugin-svelte on deployment.
I created this issue sveltejs/vite-plugin-svelte#61 (comment)
If I hear anything or get a solution I'll post it here

svelte.config.js Outdated Show resolved Hide resolved
@sebastinez
Copy link
Member Author

sebastinez commented Jun 17, 2021

The CI errors come from the missing up to date package-lock.json.. I did an eslint linting and no errors where thrown

Copy link
Contributor

@cloudhead cloudhead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@sebastinez
Copy link
Member Author

sebastinez commented Jun 17, 2021

It seems like the check-build CI we could have pass installing as a devDependency @types/node
For the failing svelte check I have no clue what could be happening there, I ran it on my machine an no errors found. Will look into it

@sebastinez
Copy link
Member Author

I uploaded the package-lock.json with the @types/node package installed and it seems that this time there were no errors. So I'll leave it this way.
Rebased it on master, keen on going back to idx and less devops 😄

src/config.json Outdated
@@ -62,6 +62,7 @@
},
"tokens": []
},
"RADICLE_HTTP_API":"",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's call this radicle: { api: string }, so it matches the format of the safe config.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay yeah no problem, I kept it that way to maintain the process.env style for a eventual return to injected env vars

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, we can just do config.radicle.api = import.meta.env.RADICLE_HTTP_API when that happens

Sebastian Martinez added 13 commits June 18, 2021 09:21
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
@cloudhead cloudhead merged commit 4dfa762 into radicle-dev:master Jun 18, 2021
@sebastinez sebastinez deleted the sebastinez/add-vite branch June 19, 2021 03:14
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

Successfully merging this pull request may close these issues.

2 participants