include globals in rollup config.

This commit is contained in:
Miroslav Šedivý 2020-11-05 12:52:00 +01:00
parent fa28f2c6ee
commit ec1e0c63f4

View File

@ -11,6 +11,12 @@ export default {
output: { output: {
name: 'NekoClient', name: 'NekoClient',
exports: 'named', exports: 'named',
globals: {
"vue": "Vue",
"vue-property-decorator": "VueClassComponent",
"vue-class-component": "VueClassComponent",
"axios": "axios",
},
}, },
plugins: [ plugins: [
typescript({ typescript({
@ -25,11 +31,18 @@ export default {
{ find:/^@\/(.+)/, replacement: './$1' } { find:/^@\/(.+)/, replacement: './$1' }
] ]
}), }),
commonjs(), commonjs({
include: 'node_modules/**',
}),
autoExternal(), autoExternal(),
buble({ buble({
objectAssign: 'Object.assign', objectAssign: 'Object.assign',
}), }),
terser(), terser(),
], ],
external: [
"vue",
"vue-class-component",
"axios"
],
}; };