提交 fcd0aecd 作者: 方治民

style: 代码格式调整

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