Using RollUp
This commit is contained in:
49
rollup.config.js
Normal file
49
rollup.config.js
Normal file
@@ -0,0 +1,49 @@
|
||||
import terser from '@rollup/plugin-terser';
|
||||
|
||||
export default [
|
||||
// ESM
|
||||
{
|
||||
input: './index.js',
|
||||
external: ['sigpro'],
|
||||
output: {
|
||||
file: './dist/sigpro-ui.esm.js',
|
||||
format: 'esm'
|
||||
}
|
||||
},
|
||||
// CommonJS
|
||||
{
|
||||
input: './index.js',
|
||||
external: ['sigpro'],
|
||||
output: {
|
||||
file: './dist/sigpro-ui.cjs',
|
||||
format: 'cjs'
|
||||
}
|
||||
},
|
||||
// UMD (IIFE para navegador)
|
||||
{
|
||||
input: './index.js',
|
||||
external: ['sigpro'],
|
||||
output: {
|
||||
file: './dist/sigpro-ui.umd.js',
|
||||
format: 'iife',
|
||||
name: 'SigProUI',
|
||||
globals: {
|
||||
sigpro: 'SigProCore'
|
||||
}
|
||||
}
|
||||
},
|
||||
// UMD minificado
|
||||
{
|
||||
input: './index.js',
|
||||
external: ['sigpro'],
|
||||
output: {
|
||||
file: './dist/sigpro-ui.umd.min.js',
|
||||
format: 'iife',
|
||||
name: 'SigProUI',
|
||||
globals: {
|
||||
sigpro: 'SigProCore'
|
||||
},
|
||||
plugins: [terser()]
|
||||
}
|
||||
}
|
||||
];
|
||||
Reference in New Issue
Block a user