swarnam-obsidian/rollup.config.js

30 lines
676 B
JavaScript
Raw Normal View History

2020-10-26 15:58:14 +00:00
import typescript from '@rollup/plugin-typescript';
import {nodeResolve} from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
const isProd = (process.env.BUILD === 'production');
2021-03-03 14:41:18 +00:00
const banner =
`/*
THIS IS A GENERATED/BUNDLED FILE BY ROLLUP
if you want to view the source visit the plugins github repository
*/
`;
2020-10-26 15:58:14 +00:00
export default {
input: 'main.ts',
output: {
dir: '.',
sourcemap: 'inline',
sourcemapExcludeSources: isProd,
2020-10-26 15:58:14 +00:00
format: 'cjs',
2021-03-03 14:41:18 +00:00
exports: 'default',
banner,
2020-10-26 15:58:14 +00:00
},
external: ['obsidian'],
plugins: [
typescript(),
nodeResolve({browser: true}),
commonjs(),
]
};