Skip to content

Commit 81a6939

Browse files
committed
update build
1 parent 7b0f878 commit 81a6939

File tree

3 files changed

+119
-10
lines changed

3 files changed

+119
-10
lines changed

package.json

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "vue-color-input",
3+
"type": "module",
34
"version": "1.0.9",
45
"description": "Slick and perfomant vue 3 color picker component whose goal is to replace <input type=color>",
56
"keywords": [
@@ -12,16 +13,22 @@
1213
"author": "Ivan Che <[email protected]>",
1314
"license": "MIT",
1415
"repository": "gVguy/vue-color-input",
15-
"main": "dist/color-input.ssr.js",
16-
"browser": "dist/color-input.esm.js",
17-
"module": "dist/color-input.esm.js",
18-
"unpkg": "dist/color-input.min.js",
1916
"files": [
2017
"dist/*",
2118
"src/**/*.vue",
2219
"src/assets/*.svg"
2320
],
24-
"sideEffects": ["**/*.css"],
21+
"sideEffects": [
22+
"**/*.css"
23+
],
24+
"main": "./dist/color-input.umd.js",
25+
"module": "./dist/color-input.mjs",
26+
"exports": {
27+
".": {
28+
"import": "./dist/color-input.mjs",
29+
"require": "./dist/color-input.umd.cjs"
30+
}
31+
},
2532
"scripts": {
2633
"dev": "vite dev",
2734
"prebuild": "rimraf ./dist",
@@ -40,12 +47,10 @@
4047
"postcss": "^8.2.10",
4148
"sass": "^1.42.1",
4249
"vite": "^5.3.5",
50+
"vite-plugin-lib-inject-css": "^2.1.1",
4351
"vue": "^3.4.26"
4452
},
4553
"peerDependencies": {
4654
"vue": "^3.0.5"
47-
},
48-
"engines": {
49-
"node": ">=14"
5055
}
5156
}

pnpm-lock.yaml

Lines changed: 100 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vite.config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import vue from '@vitejs/plugin-vue'
2+
import { libInjectCss } from 'vite-plugin-lib-inject-css'
23
/** @type {import('vite').UserConfig} */
34
export default {
45
build: {
@@ -8,8 +9,11 @@ export default {
89
name: 'ColorInput'
910
},
1011
rollupOptions: {
11-
external: ['vue']
12+
external: ['vue'],
13+
output: {
14+
globals: { vue: 'Vue' },
15+
},
1216
},
1317
},
14-
plugins: [vue()]
18+
plugins: [vue(), libInjectCss()]
1519
}

0 commit comments

Comments
 (0)