element-plus/build/rollup.config.js
2020-10-14 19:05:55 +08:00

35 lines
791 B
JavaScript

import vue from 'rollup-plugin-vue'
import typescript from 'rollup-plugin-typescript2'
import css from 'rollup-plugin-css-only'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import { terser } from 'rollup-plugin-terser'
import path from 'path'
export default [
// ESM
{
input: path.resolve(__dirname, '../packages/element-plus/index.ts'),
output: {
format: 'esm',
file: 'lib/library.esm.js',
// sourcemap: 'inline',
},
plugins: [
terser(),
nodeResolve(),
commonjs(),
typescript({
abortOnError: false,
}),
css(),
vue({
target: 'browser',
css: false,
exposeFilename: false,
}),
],
external: ['vue'],
},
]