Skip to content

Commit 86fd87f

Browse files
Draw the rest fo the owl
1 parent d74e958 commit 86fd87f

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.DS_Store
22
node_modules
33
/dist
4+
/dist_types
45

56

67
# local env files

package.json

+6-4
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@
99
"lint:fix": "eslint src --ext .js,.ts,.vue --debug --fix",
1010
"validate:types": "tsc"
1111
},
12-
"files": [
13-
"dist"
14-
],
1512
"main": "./dist/vue-charts.umd.js",
1613
"module": "./dist/vue-charts.es.js",
17-
"types": "./dist/index.d.ts",
14+
"typings": "./dist_types/index.d.ts",
15+
"files": [
16+
"src",
17+
"dist",
18+
"dist_types"
19+
],
1820
"devDependencies": {
1921
"@babel/helper-compilation-targets": "^7.16.3",
2022
"@babel/runtime": "^7.16.3",

src/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { default as BarChart } from './BarChart.vue'
2+
export { default as DivergingBarChart } from './DivergingBarChart.vue'

vite.config.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,17 @@ const config = defineConfig({
1717
lib: {
1818
entry: resolve(__dirname, 'src/index.ts'),
1919
name: 'RADAR',
20-
fileName: (format) => `vue-charts.${format}.js`,
2120
},
21+
rollupOptions: {
22+
// ensures vue isn't added to the bundle
23+
external: ['vue'],
24+
output: {
25+
// Provide vue as a global variable to use in the UMD build
26+
globals: {
27+
vue: 'Vue'
28+
}
29+
},
30+
}
2231
},
2332
})
2433

0 commit comments

Comments
 (0)