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

Feature/app-template-vue-typescript #1088

Merged

Conversation

Akimyou
Copy link
Contributor

@Akimyou Akimyou commented Sep 18, 2020

Changes

  • add app-template-vue-typescript template
  • fix @snowpack/app-scripts-vue build bug

add app-template-vue-typescript template

fix @snowpack/app-scripts-vue build bug

If we use /web_modules/vue.js here, the build result will run failed. Because absolute path import will be ignore when tree shaking. So we need to change it.

https://github.com/pikapkg/snowpack/compare/master...Akimyou:feature/app-template-vue-typescript?expand=1#diff-460291335ddc08075bf891e8e0c5f93fL99

Testing

Demo Repo: https://github.com/Akimyou/snowpack/tree/feature/app-template-vue-typescript-demo

TODO:

  • update create-snowpack-app.test.js.snap

@vercel
Copy link

vercel bot commented Sep 18, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pikapkg/snowpack/7o51y3us9
✅ Preview: https://snowpack-git-fork-akimyou-feature-app-template-vue-typescript.pikapkg.vercel.app

@Akimyou
Copy link
Contributor Author

Akimyou commented Sep 18, 2020

need help for update test. 😭

"test": "echo \"Vue 3.0 test support is still in progress.\" && exit 1"
},
"dependencies": {
"vue": "^3.0.0-rc.4"
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Upgraded

@gr2m
Copy link
Contributor

gr2m commented Sep 18, 2020

need help for update test. 😭

You can update the snapshot with

npx jest test/create-snowpack-app/create-snowpack-app.test.js --updateSnapshot

But I don't have enough domain knowledge to say if these changes look good or not:
https://gist.github.com/gr2m/2214b5697348b221b1e1f217d3f031b7

@axetroy
Copy link

axetroy commented Sep 19, 2020

For some reasons, some projects can only stay in Vue 2.x

Does this works on Vue 2.x?

@FredKSchott
Copy link
Owner

The Snowpack Vue plugin only works with Vue 3.x. Vue 2.0 isn't an option fo us, the Vue team changed the compiler pretty dramatically from 2->3 and we can't support both versions of the Vue compiler.

@axetroy
Copy link

axetroy commented Sep 20, 2020

The Snowpack Vue plugin only works with Vue 3.x. Vue 2.0 isn't an option fo us, the Vue team changed the compiler pretty dramatically from 2->3 and we can't support both versions of the Vue compiler.

could we publish 2 vue plugin? one for vue 3, another for vue 2.

@Akimyou Akimyou changed the title Feature/app-template-vue-typescript WIP: Feature/app-template-vue-typescript Sep 21, 2020
@Akimyou Akimyou changed the title WIP: Feature/app-template-vue-typescript Feature/app-template-vue-typescript Sep 21, 2020
@FredKSchott
Copy link
Owner

If someone wants to work on it, I would love to feature a Vue v2 plugin as a community plugin!

But given that Vue v3 is now live and claims backward-compatability for Vue v2, it no longer makes sense for us to maintain this ourselves as an official plugin

Copy link
Collaborator

@drwpow drwpow left a comment

Choose a reason for hiding this comment

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

Thank you for this! I love the different examples of JSX, TSX, TSX + Vue, etc. All very helpful.

To @gr2m’s question, I skimmed the snapshot diffs and nothing jumped out to me. I think this is good to merge (pending the easy-to-fix yarn.lock conflict).

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.

5 participants