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

Introduce a build step to the github workflow #3

Closed
sduduzog opened this issue Jun 25, 2021 · 8 comments
Closed

Introduce a build step to the github workflow #3

sduduzog opened this issue Jun 25, 2021 · 8 comments

Comments

@sduduzog
Copy link
Collaborator

Chore

The nuxt-supabase issue supabase-community/nuxt-supabase#1 was most likely caused by the fact that vue-supabase uses es module syntax whilst nuxt expects primarily commonjs module syntax even if it does also build to target es with a config toggle.

Describe the chore

Simply adding a build script to package.json and then either configuring babel to build commonjs files or either add typescript, which would be simpler than the latter, and benefit from auto generating typings for any changes that might come through

Additional context

A current workaround for this is to rewrite the code to use module.exports/require syntax but this is temporary as supporting multiple targets will eventually need a build step i.e. Vue3 might react weirdly to code that isn't es module syntax ready

Here's my other reference
https://stackoverflow.com/questions/62488898/node-js-syntaxerror-cannot-use-import-statement-outside-a-module

@king-11
Copy link

king-11 commented Jul 18, 2021

Hey, @sduduzog I can work on this issue, my thought is we can use Vue3 using Vite along with typescript to handle the dev server and build step for us.

@sduduzog
Copy link
Collaborator Author

@king-11 Please yes definitely.

I'm not sure how you'll be able to test but also you'll need a thumbs up from @scottrobertson as he also needs to make sure it works and does not mess up releases.

Also @scottrobertson should be comfortable with the change to typescript as he's the maintainer... We could still do javascript but with modern EcmaScript i.e. ES2018 or something

@scottrobertson
Copy link
Contributor

scottrobertson commented Jul 22, 2021

I would much prefer Typescript if we can make it work in a way that end users don't need to know or care about it being written in TS. It needs to carry on working for Vue2 too.

@sduduzog
Copy link
Collaborator Author

I've given it a try here #5 (working with Vue2 and 3) but ran into issues while testing with Vue2... some weird error when the project doesn't use the composition-api and it's not installed. Still gonna investigate... this weekend.

I would much prefer Typescript if we can make it work in a way that end users don't need to know or care about it being written in TS. It needs to carry on working for Vue2 too.

Definitely!

@scottrobertson
Copy link
Contributor

@king-11 the Vue3 stuff has been merged using vue-demi. Do you still want to help rewrite this into TS maybe?

@king-11
Copy link

king-11 commented Jul 25, 2021

Yeah I was awaiting if there was anything I can do 😅 I will start looking into it thanks for letting me know

@king-11
Copy link

king-11 commented Jul 29, 2021

@scottrobertson, sorry for the delay. I will try to work this out by next weekend and open a PR too,

@scottrobertson
Copy link
Contributor

@king-11 no need to be sorry... you are doing this for free in your own time! 🤣

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

3 participants