1
0
mirror of synced 2024-11-29 00:26:12 +03:00
vue-formulario/build/rollup.iife.config.js

40 lines
1.3 KiB
JavaScript
Raw Normal View History

import commonjs from '@rollup/plugin-commonjs' // Convert CommonJS modules to ES6
import buble from '@rollup/plugin-buble' // Transpile/polyfill with reasonable browser support
import internal from 'rollup-plugin-internal'
import resolve from '@rollup/plugin-node-resolve'
import { terser } from 'rollup-plugin-terser'
import typescript from '@rollup/plugin-typescript'
import vue from 'rollup-plugin-vue' // Handle .vue SFC files
// noinspection JSUnusedGlobalSymbols
export default {
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',
'nanoid/non-secure': 'nanoid',
},
2020-10-09 22:58:28 +03:00
},
plugins: [
resolve({
browser: true,
preferBuiltins: false,
2020-10-09 22:58:28 +03:00
}),
commonjs(),
internal(['is-plain-object', 'nanoid/non-secure', 'is-url']),
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
]
}