2020-09-30 18:21:47 +08:00
|
|
|
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',
|
2020-10-14 18:10:54 +08:00
|
|
|
// sourcemap: 'inline',
|
2020-09-30 18:21:47 +08:00
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
terser(),
|
|
|
|
nodeResolve(),
|
|
|
|
commonjs(),
|
2020-10-09 16:21:11 +08:00
|
|
|
typescript({
|
|
|
|
abortOnError: false,
|
|
|
|
}),
|
2020-09-30 18:21:47 +08:00
|
|
|
css(),
|
2020-10-14 18:10:54 +08:00
|
|
|
vue({
|
|
|
|
target: 'browser',
|
|
|
|
css: false,
|
|
|
|
exposeFilename: false,
|
|
|
|
}),
|
2020-09-30 18:21:47 +08:00
|
|
|
],
|
2020-10-14 18:10:54 +08:00
|
|
|
external: ['vue'],
|
2020-09-30 18:21:47 +08:00
|
|
|
},
|
|
|
|
]
|