Skip to content

Commit e99cee1

Browse files
committed
improvement(useCookie): Making useCookie a peerDependency as this should enable consumer to use the
1 parent 3d22ee0 commit e99cee1

File tree

3 files changed

+11
-22
lines changed

3 files changed

+11
-22
lines changed

package-lock.json

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

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"vue-hooks",
1111
"vue-use-hooks"
1212
],
13-
"main": "dist/vue-use-kit.umd.js",
1413
"module": "dist/vue-use-kit.es5.js",
1514
"typings": "dist/types/vue-use-kit.d.ts",
1615
"files": [
@@ -104,6 +103,7 @@
104103
"bulma": "^0.8.0",
105104
"colors": "^1.3.2",
106105
"commitizen": "^3.0.0",
106+
"cookie-universal": "^2.1.3",
107107
"cross-env": "^5.2.0",
108108
"cz-conventional-changelog": "^2.1.0",
109109
"eslint": "^6.8.0",
@@ -140,7 +140,6 @@
140140
"vue-template-compiler": "^2.6.11"
141141
},
142142
"dependencies": {
143-
"cookie-universal": "^2.1.1",
144143
"throttle-debounce": "^2.1.0"
145144
}
146145
}

rollup.config.ts

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* eslint-disable */
22
import resolve from 'rollup-plugin-node-resolve'
33
import commonjs from 'rollup-plugin-commonjs'
4-
import camelCase from 'lodash.camelcase'
54
import typescript from 'rollup-plugin-typescript2'
65
import json from 'rollup-plugin-json'
76
import ttypescript from 'ttypescript'
@@ -25,21 +24,9 @@ const banner = `/**
2524

2625
export default {
2726
input: `src/${libraryName}.ts`,
28-
output: [
29-
{
30-
banner,
31-
file: pkg.main,
32-
name: camelCase(libraryName),
33-
format: 'umd',
34-
globals: {
35-
vue: 'Vue',
36-
'@vue/composition-api': 'vueCompositionApi'
37-
}
38-
},
39-
{ file: pkg.module, format: 'es' }
40-
],
27+
output: [{ banner, file: pkg.module, format: 'es' }],
4128
// Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash')
42-
external: ['vue', '@vue/composition-api'],
29+
external: ['vue', '@vue/composition-api', 'cookie-universal'],
4330
watch: {
4431
include: 'src/**'
4532
},

0 commit comments

Comments
 (0)