1 Star 0 Fork 0

Humor/magic-analyzer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
rollup.config.mjs 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
2803307553@qq.com 提交于 2024-06-01 23:17 . Initial commit
import fs from 'fs';
import terser from '@rollup/plugin-terser';
import polyfillNode from 'rollup-plugin-polyfill-node';
import commonjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
const loadJSON = path => JSON.parse(fs.readFileSync(new URL(path, import.meta.url)));
const pkg = loadJSON('./package.json');
export default [
{
input: 'src/main.mjs',
external: ['fs'],
output: [
{
file: pkg.module,
format: 'esm'
},
{
file: pkg.browser,
format: 'umd',
name: 'analyze',
globals: {
fs: 'fs',
path: 'path',
url: 'url',
}
}
],
plugins: [
terser(),
polyfillNode(),
resolve(),
commonjs({
polyfillNode: true
}),
]
},
{
input: 'src/main.mjs',
output: [
{
file: pkg.module.replace('.mjs', '.min.mjs'),
format: 'esm'
},
{
file: pkg.browser.replace('.js', '.min.js'),
format: 'umd',
name: 'analyze',
globals: {
fs: 'fs',
path: 'path',
url: 'url',
}
}
],
plugins: [
terser(),
polyfillNode(),
resolve(),
commonjs({
polyfillNode: true
}),
]
}
];
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/giteeHumor/magic-analyzer.git
git@gitee.com:giteeHumor/magic-analyzer.git
giteeHumor
magic-analyzer
magic-analyzer
master

搜索帮助