2020-02-28 18:46:08 +03:00
|
|
|
import resolve from '@rollup/plugin-node-resolve'
|
2020-03-07 17:03:59 +03:00
|
|
|
import commonjs from '@rollup/plugin-commonjs' // Convert CommonJS modules to ES6
|
|
|
|
import buble from '@rollup/plugin-buble' // Transpile/polyfill with reasonable browser support
|
2020-02-28 18:46:08 +03:00
|
|
|
import vue from 'rollup-plugin-vue' // Handle .vue SFC files
|
|
|
|
import internal from 'rollup-plugin-internal'
|
|
|
|
import { terser } from 'rollup-plugin-terser'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
input: 'src/Formulate.js', // Path relative to package.json
|
|
|
|
output: {
|
2020-02-28 18:56:46 +03:00
|
|
|
name: 'VueFormulate',
|
2020-02-29 07:30:43 +03:00
|
|
|
exports: 'default',
|
2020-02-28 18:56:46 +03:00
|
|
|
format: 'iife',
|
2020-02-28 18:46:08 +03:00
|
|
|
globals: {
|
|
|
|
'is-plain-object': 'isPlainObject',
|
2020-02-28 19:19:44 +03:00
|
|
|
'nanoid/non-secure': 'nanoid',
|
2020-03-07 17:03:59 +03:00
|
|
|
'is-url': 'isUrl',
|
|
|
|
'@braid/vue-formulate-i18n': 'VueFormulateI18n'
|
2020-02-28 18:46:08 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
resolve({
|
|
|
|
browser: true,
|
|
|
|
preferBuiltins: false
|
|
|
|
}),
|
|
|
|
commonjs(),
|
2020-03-07 17:03:59 +03:00
|
|
|
internal(['is-plain-object', 'nanoid/non-secure', 'is-url', '@braid/vue-formulate-i18n']),
|
2020-02-28 18:46:08 +03:00
|
|
|
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()
|
|
|
|
]
|
|
|
|
}
|