Ai
1 Star 1 Fork 1

Mr.Y/vue-formula-editor

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rollup.config.js 1.07 KB
一键复制 编辑 原始数据 按行查看 历史
Mr.Y 提交于 2024-08-14 12:32 +08:00 . 🔧feat: 完善功能架构
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import vue from 'rollup-plugin-vue';
import json from '@rollup/plugin-json';
import postcss from 'rollup-plugin-postcss';
import { terser } from 'rollup-plugin-terser';
export default {
input: './src/index.js',
output: [
{
file: 'dist/bundle.esm.js',
format: 'esm',
},
{
file: 'dist/bundle.umd.js',
format: 'umd',
name: 'VueFormula',
globals: {
vue: 'Vue',
},
},
],
plugins: [
json(),
resolve({
browser: true,
preferBuiltins: false,
mainFields: ['module', 'main'], // 确保优先选择 ESM 格式
}),
commonjs({
include: 'node_modules/**',
dynamicRequireTargets: [
// include here the paths that use dynamic require
'node_modules/@formulajs/formulajs/lib/cjs/index.cjs',
],
}),
vue({
compileTemplate: true,
css: true,
}),
postcss(),
terser(),
],
external: ['vue'], // 将 Vue 作为外部依赖不打包进库中
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/i1054959069/vue-formula-editor.git
git@gitee.com:i1054959069/vue-formula-editor.git
i1054959069
vue-formula-editor
vue-formula-editor
master

搜索帮助