mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-09 04:31:35 +08:00
8131aa343c
* chore: migrate to vite2 * styles: remove unsed code * chore: update package.json Co-authored-by: Volankey <jiwen.bai@tusimple.ai>
41 lines
952 B
JavaScript
41 lines
952 B
JavaScript
const path = require('path')
|
|
const { babel } = require('@rollup/plugin-babel')
|
|
const createNaiveDemoVitePlugin = require('./build/vite-plugin-demo')
|
|
|
|
module.exports = {
|
|
root: __dirname,
|
|
plugins: createNaiveDemoVitePlugin(),
|
|
alias: [
|
|
{
|
|
find: 'naive-ui',
|
|
replacement: path.resolve(__dirname, './src')
|
|
}
|
|
],
|
|
define: {
|
|
'process.env.NODE_ENV': `'${process.env.NODE_ENV}'`,
|
|
__DEV__: process.env.NODE_ENV !== 'production'
|
|
},
|
|
optimizeDeps: {
|
|
include: [
|
|
'highlight.js/lib/core',
|
|
'highlight.js/lib/languages/cpp',
|
|
'highlight.js/lib/languages/javascript',
|
|
'highlight.js/lib/languages/python',
|
|
'@vicons/fluent/Compose16Regular.js',
|
|
'date-fns/locale'
|
|
]
|
|
},
|
|
build: {
|
|
outDir: 'site',
|
|
minify: false,
|
|
rollupOptions: {
|
|
plugins: [
|
|
babel({
|
|
babelHelpers: 'bundled'
|
|
// exclude: 'node_modules/highlight.js/**'
|
|
})
|
|
]
|
|
}
|
|
}
|
|
}
|