1
0
mirror of synced 2024-11-22 13:26:06 +03:00
vue-formulario/build/rollup.config.js
2020-05-22 14:22:56 +03:00

35 lines
996 B
JavaScript

import commonjs from '@rollup/plugin-commonjs' // Convert CommonJS modules to ES6
import buble from '@rollup/plugin-buble' // Transpile/polyfill with reasonable browser support
import autoExternal from 'rollup-plugin-auto-external'
import vue from 'rollup-plugin-vue' // Handle .vue SFC files
import { terser } from 'rollup-plugin-terser'
export default {
input: 'src/Formulario.js', // Path relative to package.json
output: [
{
name: 'Formulario',
exports: 'default',
globals: {
'is-plain-object': 'isPlainObject',
'nanoid/non-secure': 'nanoid',
'is-url': 'isUrl',
},
sourcemap: false
}
],
external: ['nanoid/non-secure'],
plugins: [
commonjs(),
autoExternal(),
vue({
css: true, // Dynamically inject css as a <style> tag
compileTemplate: true // Explicitly convert template to render function
}),
buble({
objectAssign: 'Object.assign'
}), // Transpile to ES5,
terser()
]
}