vitejs refactor #110

Merged
trentlarson merged 17 commits from jsnbuchanan/crowd-funder-for-time-pwa:feat/vitejs into master 2024-04-09 23:49:48 +00:00
Owner

Here's the first stab at the vitejs refactor. I'm not completely done testing. When I start it up, I get the below screenshot with an error notification, Could not set notifications., so I could have messed something up.

I also see App.vue:346 Got vapid key: in the browser console... which may just be an error in my local configuration.

To start the vite development server run:

npm run dev

The other big difference was having to change environment variables. Instead of VUE_APP_, the prefix is now VITE_.

So, we'll need to update devops configs probably.

Here's the first stab at the vitejs refactor. I'm not completely done testing. When I start it up, I get the below screenshot with an error notification, `Could not set notifications.`, so I could have messed something up. I also see `App.vue:346 Got vapid key:` in the browser console... which may just be an error in my local configuration. To start the vite development server run: ``` npm run dev ``` The other big difference was having to change environment variables. Instead of `VUE_APP_`, the prefix is now `VITE_`. **So, we'll need to update devops configs probably.**
jsnbuchanan added 6 commits 2024-03-25 14:19:04 +00:00
Previous error:

Error: The following dependencies are imported but could not be resolved:

  dexie-export-import/dist/import (imported by /Users/jason/dev/src/trent/crowd-funder-for-time-pwa/src/views/AccountViewView.vue?id=0)

Are they installed?
    at file:///Users/jason/dev/src/trent/crowd-funder-for-time-pwa/node_modules/vite/dist/node/chunks/dep-DJaaTb_D.js:52506:23
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async file:///Users/jason/dev/src/trent/crowd-funder-for-time-pwa/node_modules/vite/dist/node/chunks/dep-DJaaTb_D.js:51972:38
This port is 8080. This is done to not break existing tooling and devops code.
- `npm run dev`
Owner

I'll put items into separate comments.

  • Looks like the npm run serve doesn't work -- at least, I get a blank screen at the port it gives. Since npm run dev now runs fine, we can just remove the serve from the README.
I'll put items into separate comments. - Looks like the `npm run serve` doesn't work -- at least, I get a blank screen at the port it gives. Since `npm run dev` now runs fine, we can just remove the `serve` from the README.
Owner
  • You're right about the /vapid calls: those simply don't work locally and that's fine. (We only test that on dev servers with domains.)
* You're right about the /vapid calls: those simply don't work locally and that's fine. (We only test that on dev servers with domains.)
Owner
  • This one is a showstopper: on the account screen, "Download settings & contacts" gives a red error with this in the console: "Export Error: TypeError: (intermediate value).export is not a function", complaining about "generateDatabaseBlob"

This works OK on the other repo's master branch.

* This one is a showstopper: on the account screen, "Download settings & contacts" gives a red error with this in the console: "Export Error: TypeError: (intermediate value).export is not a function", complaining about "generateDatabaseBlob" This works OK on the other repo's master branch.
Owner

Things look pretty good! I think there's just that one issue. I'll try an actual deploy in docker onto the test server soon.

Things look pretty good! I think there's just that one issue. I'll try an actual deploy in docker onto the test server soon.
trentlarson reviewed 2024-04-07 00:37:06 +00:00
@@ -516,7 +516,6 @@
<script lang="ts">
import { AxiosError, AxiosRequestConfig } from "axios";
import Dexie from "dexie";
import "dexie-export-import";
Owner

This is a line that is needed for the db.export call (since it adds to the Dexie prototype).

This is a line that is needed for the db.export call (since it adds to the Dexie prototype).
trentlarson reviewed 2024-04-07 00:52:28 +00:00
@@ -0,0 +12,4 @@
alias: {
"@": path.resolve(__dirname, "./src"),
buffer: path.resolve(__dirname, 'node_modules', 'buffer'),
'dexie-export-import/dist/import': 'dexie-export-import/dist/import/index.js',
Owner

I now see this, which possibly takes the place of that import... so I guess we'll want to talk more about how this should work

I now see this, which possibly takes the place of that import... so I guess we'll want to talk more about how this should work
Owner

It works to have both of these in place so I'll continue with both.

It works to have both of these in place so I'll continue with both.
Author
Owner

Okay. Sounds good @trentlarson

Okay. Sounds good @trentlarson
jsnbuchanan marked this conversation as resolved
Owner

Things work, but FYI with npm run dev when I make changes to files then the effects don't take place immediately -- which is curious because the console will show a message thus:

[vite] hot updated: /src/views/AccountViewView.vue

I only see changes when I reload.
Not a show-stopper.

Things work, but FYI with `npm run dev` when I make changes to files then the effects don't take place immediately -- which is curious because the console will show a message thus: `[vite] hot updated: /src/views/AccountViewView.vue` I only see changes when I reload. Not a show-stopper.
jsnbuchanan added 9 commits 2024-04-07 17:52:44 +00:00
Owner

My work is continuing here: jsnbuchanan/crowd-funder-for-time-pwa#1

My work is continuing here: https://gitea.anomalistdesign.com/jsnbuchanan/crowd-funder-for-time-pwa/pulls/1
jsnbuchanan changed title from WIP: vitejs refactor to vitejs refactor 2024-04-07 17:56:43 +00:00
jsnbuchanan added 2 commits 2024-04-09 10:05:57 +00:00
trentlarson merged commit a0ef8b6fd3 into master 2024-04-09 23:49:48 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: trent_larson/crowd-funder-for-time-pwa#110