1 Star 0 Fork 13

jinjin/canvas-editor

forked from ~朴:shu/canvas-editor 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vite.config.ts 1.01 KB
一键复制 编辑 原始数据 按行查看 历史
~朴:shu 提交于 2024-01-22 09:39 . first commit
import { defineConfig } from 'vite'
import typescript from '@rollup/plugin-typescript'
import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js'
import * as path from 'path'
export default defineConfig(({ mode }) => {
const name = 'canvas-editor'
if (mode === 'lib') {
return {
plugins: [
cssInjectedByJsPlugin({
styleId: `${name}-style`,
topExecutionPriority: true
}),
{
...typescript({
tsconfig: './tsconfig.json',
include: ['./src/editor/**']
}),
apply: 'build',
declaration: true,
declarationDir: 'types/',
rootDir: '/'
}
],
build: {
lib: {
name,
fileName: name,
entry: path.resolve(__dirname, 'src/editor/index.ts')
},
rollupOptions: {
output: {
sourcemap: true
}
}
}
}
}
return {
base: `/${name}/`,
server: {
host: '0.0.0.0'
}
}
})
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jinjinge/canvas-editor.git
git@gitee.com:jinjinge/canvas-editor.git
jinjinge
canvas-editor
canvas-editor
main

搜索帮助