You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tauri-plugins-workspace/webview-src/rollup.config.js

36 lines
754 B

import resolve from "@rollup/plugin-node-resolve";
import { terser } from "rollup-plugin-terser";
import typescript from "@rollup/plugin-typescript";
export default [
{
input: "./webview-src/index.ts",
output: {
dir: "./webview-dist",
entryFileNames: "[name].min.js",
format: "esm",
},
plugins: [
resolve(),
terser(),
typescript({
tsconfig: "./webview-src/tsconfig.json",
}),
],
},
{
input: "./webview-src/index.ts",
external: ['@tauri-apps/api/tauri'],
output: {
dir: "./webview-dist",
entryFileNames: "[name].mjs",
format: "esm",
},
plugins: [
typescript({
tsconfig: "./webview-src/tsconfig.json",
}),
],
},
];