提交 fcd0aecd 作者: 方治民

style: 代码格式调整

上级 f79cfaf6
......@@ -4,7 +4,7 @@ import type { ConfigEnv, UserConfig } from 'vite'
import dayjs from 'dayjs'
import pkg from './package.json'
import { createVitePlugins } from './build/vite'
import { getRootPath, wrapperEnv, isDevFn } from './build/utils'
import { getRootPath, isDevFn, wrapperEnv } from './build/utils'
// https://vitejs.dev/config/
export default ({ mode }: ConfigEnv): UserConfig => {
......@@ -17,12 +17,12 @@ export default ({ mode }: ConfigEnv): UserConfig => {
// /@xxxx => src/xxxx
{
find: /\/?@\//,
replacement: getRootPath('./src') + '/',
replacement: `${getRootPath('./src')}/`,
},
// /#xxxx => types/xxxx
{
find: /\/#\//,
replacement: getRootPath('./types') + '/',
replacement: `${getRootPath('./types')}/`,
},
],
},
......@@ -32,7 +32,7 @@ export default ({ mode }: ConfigEnv): UserConfig => {
},
build: {
target: 'es2015',
sourcemap: isDevFn(mode) ? true : false,
sourcemap: !!isDevFn(mode),
rollupOptions: {
output: {
inlineDynamicImports: false,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论