Skip to content

Commit bbeec94

Browse files
committed
chore: npm
1 parent 3dc69a6 commit bbeec94

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/node_modules
22
/dist
3+
/lib

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.0.1",
44
"description": "vue-lazy-load-image-component",
55
"type": "module",
6+
"main": "lib/index.js",
67
"scripts": {
78
"dev": "vite",
89
"build": "vite build",
@@ -12,6 +13,7 @@
1213
"keywords": [],
1314
"author": "",
1415
"license": "ISC",
16+
"files": ["lib"],
1517
"dependencies": {
1618
"@vitejs/plugin-vue": "^4.2.1",
1719
"eslint": "^8.40.0",

vite.config.ts

+4
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,19 @@ import vueJsx from '@vitejs/plugin-vue-jsx'
55
export default defineConfig({
66
plugins: [vueJsx()],
77
build: {
8+
// 打包css到lib文件夹
9+
810
lib: {
911
entry: 'src/index.ts',
1012
name: 'vue-lazy-load-image-component',
1113
fileName: 'index',
1214
formats: ['es'],
1315
},
16+
1417
rollupOptions: {
1518
external: ['vue'],
1619
output: {
20+
dir:'lib',
1721
globals: {
1822
vue: 'Vue'
1923
}

0 commit comments

Comments
 (0)