diff --git a/package.json b/package.json index aa4a2e0..87ef3b0 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ "build": "rollup -c --environment NODE_ENV:production", "dev-build": "rollup -cw", "test": "vitest", - "lint": "eslint --cache ." + "lint": "eslint --cache .", + "prepack": "pnpm build && clean-pkg-json -k unpkg" }, "simple-git-hooks": { "pre-commit": "pnpm lint-staged" @@ -48,6 +49,7 @@ "@rollup/plugin-babel": "^6.0.3", "@rollup/plugin-terser": "^0.4.2", "@vue/test-utils": "^1.3.5", + "clean-pkg-json": "^1.2.0", "core-js": "^3.30.2", "eslint": "^8.40.0", "jsdom": "^22.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0a00664..212f0b5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,6 +19,9 @@ devDependencies: '@vue/test-utils': specifier: ^1.3.5 version: 1.3.5(vue-template-compiler@2.7.14)(vue@2.7.14) + clean-pkg-json: + specifier: ^1.2.0 + version: 1.2.0 core-js: specifier: ^3.30.2 version: 3.30.2 @@ -2439,6 +2442,11 @@ packages: engines: {node: '>=8'} dev: true + /clean-pkg-json@1.2.0: + resolution: {integrity: sha512-QHBWWOtpSCv5nfMFKwyxn4WMvkYE0msxj5xiqejYGqYepWVrK7O/om1Vn6nSl/WPtYn8ge9YmSCbTi1Hp8k+Hg==} + hasBin: true + dev: true + /clean-regexp@1.0.0: resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} engines: {node: '>=4'}