1
0
mirror of synced 2024-11-22 21:36:04 +03:00
vue-formulario/build/rollup.config.js
2020-02-28 23:30:43 -05:00

32 lines
941 B
JavaScript

import autoExternal from 'rollup-plugin-auto-external'
import commonjs from 'rollup-plugin-commonjs' // Convert CommonJS modules to ES6
import vue from 'rollup-plugin-vue' // Handle .vue SFC files
import buble from 'rollup-plugin-buble' // Transpile/polyfill with reasonable browser support
import { terser } from 'rollup-plugin-terser'
export default {
input: 'src/Formulate.js', // Path relative to package.json
output: {
name: 'Formulate',
exports: 'default',
globals: {
'is-plain-object': 'isPlainObject',
'nanoid/non-secure': 'nanoid',
'is-url': 'isUrl'
}
},
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()
]
}