2020-09-29 15:03:46 +08:00
|
|
|
const path = require('path')
|
|
|
|
|
2020-10-26 15:03:02 +08:00
|
|
|
const mdPlugin = require('./demo/vite-plugins/mdPlugin')
|
|
|
|
|
2020-09-29 15:03:46 +08:00
|
|
|
module.exports = {
|
|
|
|
root: __dirname,
|
2020-10-26 15:03:02 +08:00
|
|
|
plugins: [ mdPlugin() ],
|
|
|
|
optimizeDeps: {
|
|
|
|
include: ['highlight.js/lib/languages/cpp', 'highlight.js/lib/highlight',
|
|
|
|
'highlight.js/lib/languages/javascript', 'highlight.js/lib/languages/python', 'vooks']
|
|
|
|
},
|
2020-09-29 15:03:46 +08:00
|
|
|
alias: {
|
2020-10-26 15:03:02 +08:00
|
|
|
'/@naive-ui/lib/icons/': path.resolve(__dirname, './src/_icons'),
|
|
|
|
'/@naive-ui/': path.resolve(__dirname, './src'),
|
|
|
|
'src': path.resolve(__dirname, './src')
|
2020-09-29 15:03:46 +08:00
|
|
|
},
|
|
|
|
define: {
|
|
|
|
'process.env.NODE_ENV': `'${process.env.NODE_ENV}'`,
|
|
|
|
'__DEV__': process.env === 'development'
|
|
|
|
}
|
|
|
|
}
|