feat(Lazyload): support Vue 3

This commit is contained in:
chenjiahan
2020-11-30 20:20:39 +08:00
parent 5d8b7bd7fb
commit d3ca404f98
9 changed files with 2772 additions and 107 deletions

View File

@@ -1,6 +1,6 @@
# @vant/lazyload
This is a of [vue-lazyload](https://github.com/hilongjw/vue-lazyload) with Vue 3 support.
This is a fork of [vue-lazyload](https://github.com/hilongjw/vue-lazyload) with Vue 3 support.
## Install

View File

@@ -3,22 +3,29 @@
"version": "1.0.0",
"description": "",
"main": "lib/index.js",
"module": "esm/index.js",
"types": "lib/index.d.ts",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"files": [
"es",
"lib",
"types"
],
"scripts": {
"dev": "rollup --config rollup.config.js --watch",
"build": "rollup --config rollup.config.js && tsc -p ./tsconfig.json --emitDeclarationOnly"
"dev": "babel src --out-dir esm --watch",
"build": "babel src --out-dir esm && BABEL_MODULE=commonjs babel src --out-dir lib",
"release": "npm run build && release-it"
},
"license": "MIT",
"repository": "https://github.com/youzan/vant/tree/dev/packages/vant-lazyload",
"devDependencies": {
"@babel/cli": "^7.12.8",
"@babel/core": "^7.12.9",
"@babel/runtime": "7.x",
"@rollup/plugin-babel": "^5.2.1",
"@rollup/plugin-node-resolve": "^10.0.0",
"rollup": "^2.33.3",
"release-it": "^14.2.2",
"vue": "^3.0.0"
},
"browserslist": [

View File

@@ -1,13 +0,0 @@
import path from 'path';
import babel from '@rollup/plugin-babel';
import nodeResolve from '@rollup/plugin-node-resolve';
export default {
input: path.join(__dirname, 'src', 'index.js'),
output: {
dir: 'lib',
format: 'cjs',
},
external: ['vue'],
plugins: [nodeResolve(), babel({ babelHelpers: 'runtime' })],
};

File diff suppressed because it is too large Load Diff