mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-09 04:31:35 +08:00
37 lines
815 B
JavaScript
37 lines
815 B
JavaScript
const vue = require('rollup-plugin-vue')
|
|
const resolve = require('@rollup/plugin-node-resolve')
|
|
const strip = require('@rollup/plugin-strip')
|
|
const path = require('path')
|
|
const { terser } = require('rollup-plugin-terser')
|
|
const naiveSCSSVariable = require('./playground/naiveScssVarPlugin')
|
|
|
|
module.exports = {
|
|
preserveModules: true,
|
|
input: 'index.js',
|
|
output: {
|
|
format: 'esm',
|
|
dir: 'test-bundle'
|
|
},
|
|
plugins: [
|
|
vue(),
|
|
naiveSCSSVariable(),
|
|
strip(),
|
|
resolve({
|
|
extensions: ['.js', '.json', '.vue'],
|
|
jail: path.resolve(__dirname, 'packages')
|
|
}),
|
|
terser({
|
|
mangle: false,
|
|
output: {
|
|
beautify: true,
|
|
indent_level: 2
|
|
}
|
|
})
|
|
],
|
|
external: [
|
|
'vue-runtime-helpers',
|
|
'lodash-es/cloneDeep',
|
|
'resize-observer-polyfill'
|
|
]
|
|
}
|