mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 09:50:58 +08:00
b1bdb6de8b
* build: add type * chore: update * chore: update * chore: update * chore: update * chore: update * chore: update * chore: update
48 lines
1.2 KiB
JavaScript
48 lines
1.2 KiB
JavaScript
// import vue from 'rollup-plugin-vue'
|
|
import { nodeResolve } from '@rollup/plugin-node-resolve'
|
|
import path from 'path'
|
|
// import commonjs from '@rollup/plugin-commonjs'
|
|
import { terser } from 'rollup-plugin-terser'
|
|
import typescript from 'rollup-plugin-typescript2'
|
|
import pkg from '../package.json'
|
|
const deps = Object.keys(pkg.dependencies)
|
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
const vue = require('rollup-plugin-vue')
|
|
|
|
export default [
|
|
{
|
|
input: path.resolve(__dirname, '../packages/element-plus/index.ts'),
|
|
output: {
|
|
format: 'es',
|
|
file: 'lib/index.esm.js',
|
|
},
|
|
plugins: [
|
|
terser(),
|
|
nodeResolve(),
|
|
// commonjs(),
|
|
vue({
|
|
target: 'browser',
|
|
css: false,
|
|
exposeFilename: false,
|
|
}),
|
|
typescript({
|
|
tsconfigOverride: {
|
|
'include': [
|
|
'packages/**/*',
|
|
'typings/vue-shim.d.ts',
|
|
],
|
|
'exclude': [
|
|
'node_modules',
|
|
'packages/**/__tests__/*',
|
|
],
|
|
},
|
|
abortOnError: false,
|
|
}),
|
|
],
|
|
external(id) {
|
|
return /^vue/.test(id)
|
|
|| deps.some(k => new RegExp('^' + k).test(id))
|
|
},
|
|
},
|
|
]
|