mirror of
https://github.com/zsviczian/obsidian-excalidraw-plugin.git
synced 2025-08-06 05:46:28 +00:00
36 lines
764 B
JavaScript
36 lines
764 B
JavaScript
import { nodeResolve } from '@rollup/plugin-node-resolve';
|
|
import commonjs from '@rollup/plugin-commonjs';
|
|
import typescript from '@rollup/plugin-typescript';
|
|
import { terser } from 'rollup-plugin-terser';
|
|
|
|
const isProd = (process.env.NODE_ENV === 'production');
|
|
|
|
export default {
|
|
input: './index.ts',
|
|
output: {
|
|
dir: 'dist',
|
|
format: 'iife',
|
|
name: 'MathjaxToSVG', // Global variable name
|
|
exports: 'named',
|
|
sourcemap: !isProd,
|
|
},
|
|
plugins: [
|
|
typescript({
|
|
tsconfig: 'tsconfig.json',
|
|
}),
|
|
commonjs(),
|
|
nodeResolve({
|
|
browser: true,
|
|
preferBuiltins: false
|
|
}),
|
|
isProd && terser({
|
|
format: {
|
|
comments: false,
|
|
},
|
|
compress: {
|
|
passes: 2,
|
|
}
|
|
})
|
|
].filter(Boolean)
|
|
};
|