1 Star 1 Fork 0

masx200/masx200-github-io

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rollup.config.mjs 1.84 KB
一键复制 编辑 原始数据 按行查看 历史
import commonjs from "@rollup/plugin-commonjs";
import { fileCache, httpResolve } from "@masx200/rollup-plugin-http-resolve";
import alias from "@rollup/plugin-alias";
import { getBabelOutputPlugin } from "@rollup/plugin-babel";
import json from "@rollup/plugin-json";
import { nodeResolve } from "@rollup/plugin-node-resolve";
import fs from "fs";
import { defineConfig } from "rollup";
import esbuild from "rollup-plugin-esbuild";
const plugins = [
commonjs(),
json(),
nodeResolve(),
alias({
entries: JSON.parse(
(await fs.promises.readFile("./import_map.json")).toString(),
).imports,
}),
httpResolve({ cache: new fileCache() }),
getBabelOutputPlugin({
plugins: ["@babel/plugin-proposal-logical-assignment-operators"],
}),
esbuild({
// All options are optional
include: [/\.[jt]sx?$/, /^https?:\/\//], // default, inferred from `loaders` option
exclude: /node_modules/, // default
sourceMap: true, // default
minify: true,
target: "esnext", // default, or 'es20XX', 'esnext'
jsx: "preserve", // default, or 'preserve'
jsxFactory: "React.createElement",
jsxFragment: "React.Fragment",
// Like @rollup/plugin-replace
define: {},
tsconfig: "tsconfig.json", // default
// Add extra loaders
loaders: {},
}),
];
export default defineConfig([
{
input: "./build/src/getmarkdown[name].ts",
output: {
file: "./build/edge-functions/getmarkdown[name].js",
format: "esm",
sourcemap: true,
},
plugins,
},
{
input: "./build/src/getrss[name].ts",
output: {
file: "./build/edge-functions/getrss[name].js",
format: "esm",
sourcemap: true,
},
plugins,
},
]);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/masx200/masx200-github-io.git
git@gitee.com:masx200/masx200-github-io.git
masx200
masx200-github-io
masx200-github-io
master

搜索帮助