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 internal from 'rollup-plugin-internal'
|
2020-10-11 11:41:32 +03:00
|
|
|
import resolve from '@rollup/plugin-node-resolve'
|
2020-02-28 18:46:08 +03:00
|
|
|
import { terser } from 'rollup-plugin-terser'
|
2020-10-11 11:41:32 +03:00
|
|
|
import typescript from '@rollup/plugin-typescript'
|
|
|
|
import vue from 'rollup-plugin-vue' // Handle .vue SFC files
|
2020-02-28 18:46:08 +03:00
|
|
|
|
2020-10-11 11:41:32 +03:00
|
|
|
// noinspection JSUnusedGlobalSymbols
|
2020-02-28 18:46:08 +03:00
|
|
|
export default {
|
2020-10-11 11:41:32 +03:00
|
|
|
input: 'src/index.ts', // Path relative to package.json
|
2020-10-09 22:58:28 +03:00
|
|
|
output: {
|
|
|
|
name: 'VueFormulario',
|
|
|
|
exports: 'default',
|
|
|
|
format: 'iife',
|
|
|
|
globals: {
|
|
|
|
'is-plain-object': 'isPlainObject',
|
|
|
|
'is-url': 'isUrl',
|
2020-10-11 11:41:32 +03:00
|
|
|
'nanoid/non-secure': 'nanoid',
|
|
|
|
},
|
2020-10-09 22:58:28 +03:00
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
resolve({
|
|
|
|
browser: true,
|
2020-10-11 11:41:32 +03:00
|
|
|
preferBuiltins: false,
|
2020-10-09 22:58:28 +03:00
|
|
|
}),
|
|
|
|
commonjs(),
|
|
|
|
internal(['is-plain-object', 'nanoid/non-secure', 'is-url']),
|
2020-10-11 11:41:32 +03:00
|
|
|
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({
|
2020-10-11 11:41:32 +03:00
|
|
|
objectAssign: 'Object.assign',
|
2020-10-09 22:58:28 +03:00
|
|
|
}), // Transpile to ES5,
|
2020-10-11 11:41:32 +03:00
|
|
|
terser(),
|
2020-10-09 22:58:28 +03:00
|
|
|
]
|
2020-02-28 18:46:08 +03:00
|
|
|
}
|