Skip to content

Commit

Permalink
feat: support vue 3
Browse files Browse the repository at this point in the history
  • Loading branch information
mater1996 committed Jan 15, 2023
1 parent 87266ce commit 7555c62
Show file tree
Hide file tree
Showing 6 changed files with 167 additions and 411 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ dist/
*.njsproj
*.sln
.history
.vscode
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.org/
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# vue-photo-zoom-pro

> Vue picture magnifier
> Vue picture magnifier(Vue 2 & Vue 3)
![example](https://raw.githubusercontent.com/Mater1996/vue-photo-zoom-pro/master/example.png)

Expand All @@ -9,8 +9,14 @@
```js
npm install vue-photo-zoom-pro

# In Vue 2 project
npm i vue-photo-zoom-pro@2.x

# or
yarn add vue-photo-zoom-pro

# In Vue 2 project
yarn add vue-photo-zoom-pro@2.x
```
## Usage

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"core-js": "^3.0.0"
},
"peerDependencies": {
"vue": "^2.5.11"
"vue": "^3.0.0"
},
"devDependencies": {
"@babel/core": "^7.15.0",
Expand Down Expand Up @@ -73,9 +73,9 @@
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-postcss": "^4.0.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-vue": "^5.0.0",
"rollup-plugin-vue": "^6.0.0",
"serve": "^12.0.0",
"vue-template-compiler": "^2.6.14",
"vue": "^3.2.45",
"vuepress": "^1.9.7"
},
"keywords": [
Expand Down
4 changes: 1 addition & 3 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const path = require('path')
const peerDepsExternal = require('rollup-plugin-peer-deps-external')
const { nodeResolve } = require('@rollup/plugin-node-resolve')
const commonjs = require('@rollup/plugin-commonjs')
const vue = require('rollup-plugin-vue')
const babel = require('rollup-plugin-babel')
const postcss = require('rollup-plugin-postcss')
Expand Down Expand Up @@ -58,7 +57,6 @@ module.exports = ({ environment }) => {
preventAssignment: true,
values: { 'process.env.NODE_ENV': JSON.stringify(NODE_ENV) }
}),
commonjs(),
vue({
css: !isProd,
normalizer: '~vue-runtime-helpers/dist/normalize-component.js'
Expand All @@ -67,7 +65,7 @@ module.exports = ({ environment }) => {
browser: true,
preferBuiltins: true
}),
babel({
isIIFE && babel({
babelrc: true,
runtimeHelpers: true,
extensions: ['.js', '.jsx', '.es6', '.es', '.mjs', '.vue']
Expand Down
Loading

0 comments on commit 7555c62

Please sign in to comment.