1
0
mirror of synced 2024-11-22 21:36:04 +03:00
vue-formulario/build/rollup.config.js

36 lines
1.1 KiB
JavaScript
Raw Normal View History

import autoExternal from 'rollup-plugin-auto-external'
import buble from '@rollup/plugin-buble' // Transpile/polyfill with reasonable browser support
import commonjs from '@rollup/plugin-commonjs' // Convert CommonJS modules to ES6
import { terser } from 'rollup-plugin-terser'
import typescript from '@rollup/plugin-typescript'
import vue from 'rollup-plugin-vue'
// noinspection JSUnusedGlobalSymbols
export default {
input: 'src/index.ts',
output: [{
name: 'Formulario',
exports: 'default',
globals: {
'is-plain-object': 'isPlainObject',
'is-url': 'isUrl',
'nanoid/non-secure': 'nanoid',
},
sourcemap: false,
}],
2020-10-09 22:58:28 +03:00
external: ['nanoid/non-secure'],
plugins: [
commonjs(),
autoExternal(),
typescript({ sourceMap: false }),
2020-10-09 22:58:28 +03:00
vue({
css: true, // Dynamically inject css as a <style> tag
compileTemplate: true // Explicitly convert template to render function
}),
buble({
objectAssign: 'Object.assign',
2020-10-09 22:58:28 +03:00
}), // Transpile to ES5,
terser(),
2020-10-09 22:58:28 +03:00
]
}