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
example: update Vue2 example #3802
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,11 @@ | ||
# uppy-vue | ||
# Vue 2 example | ||
|
||
## Project setup | ||
You’re browsing the documentation for Vue v2.x and earlier. Check out | ||
[Vue 3 example](../vue3/) for new projects. | ||
|
||
npm install | ||
To run the example, from the root directory of this repo, run the following commands: | ||
|
||
### Compiles and hot-reloads for development | ||
|
||
npm run serve | ||
|
||
### Compiles and minifies for production | ||
|
||
npm run build | ||
|
||
### Lints and fixes files | ||
|
||
npm run lint | ||
|
||
### Customize configuration | ||
|
||
See [Configuration Reference](https://cli.vuejs.org/config/). | ||
```sh | ||
corepack yarn install | ||
corepack yarn workspace @uppy-example/vue2 dev | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,24 @@ | ||
{ | ||
"name": "@uppy-example/vue-example", | ||
"name": "@uppy-example/vue2", | ||
"version": "0.0.0", | ||
"private": true, | ||
"scripts": { | ||
"start": "vue-cli-service serve", | ||
"build": "vue-cli-service build", | ||
"lint": "vue-cli-service lint" | ||
"dev": "vite", | ||
"build": "vite build", | ||
"preview": "vite preview --port 5050" | ||
}, | ||
"dependencies": { | ||
"@uppy/core": "workspace:*", | ||
"@uppy/dashboard": "workspace:*", | ||
"@uppy/drag-drop": "workspace:*", | ||
"@uppy/progress-bar": "workspace:*", | ||
"@uppy/transloadit": "workspace:*", | ||
"@uppy/vue": "workspace:*", | ||
"core-js": "^3.6.5", | ||
"shallow-equal": "^1.2.1", | ||
"vue": "^2.6.14" | ||
}, | ||
"devDependencies": { | ||
"@vue/cli-plugin-babel": "~4.5.0", | ||
"@vue/cli-service": "~4.5.0", | ||
"vue-template-compiler": "^2.6.11" | ||
}, | ||
"browserslist": [ | ||
"> 1%", | ||
"last 2 versions", | ||
"not dead" | ||
] | ||
"vite": "^2.7.1", | ||
"vite-plugin-vue2": "^2.0.1", | ||
"vue-template-compiler": "^2.6.14" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { defineConfig } from 'vite' | ||
import { createVuePlugin } from 'vite-plugin-vue2' | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [createVuePlugin()], | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "vue-template-compiler", | ||
"version": "0.0.1", | ||
"private": true, | ||
"description": "This package is there only to avoid a version conflict in the Vue2 example." | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 don't really understand why we need this 🤔
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 put the explanation there: https://github.com/transloadit/uppy/pull/3802/files#diff-4bea83be50434c7f99646e7178ae936953bfe18cd00c64066fd67442c8b7aab7R5
If we don't have a
vue-template-compiler
package at the root level, thevue-template-compiler
of the Vue2 example will be installed to the rootnode_modules
dir instead of theexamples/vue/node_modules
dir, and because we have Vue 3 installed in the rootnode_modules
dir, it picks it up instead of the Vue 2 installed in theexamples/vue/node_modules
dir. I think that's the fault of this package to not list Vue 2 in its (peer) dependencies: https://github.com/vuejs/vue/blob/dev/packages/vue-template-compiler/package.json