Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
40 lines (37 sloc)
1012 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import typescript from '@rollup/plugin-typescript'; | |
| import {nodeResolve} from '@rollup/plugin-node-resolve'; | |
| import commonjs from '@rollup/plugin-commonjs'; | |
| import postcss from 'rollup-plugin-postcss'; | |
| import postcss_url from 'postcss-url'; | |
| import copy from 'rollup-plugin-copy'; | |
| const isProd = (process.env.BUILD === 'production'); | |
| const banner = | |
| `/* | |
| THIS IS A GENERATED/BUNDLED FILE BY ROLLUP | |
| if you want to view the source visit the plugins github repository | |
| */ | |
| `; | |
| export default { | |
| input: 'src/main.ts', | |
| output: { | |
| dir: './dist', | |
| sourcemap: isProd ? false : 'inline', | |
| sourcemapExcludeSources: isProd, | |
| format: 'cjs', | |
| exports: 'default', | |
| banner, | |
| }, | |
| external: ['obsidian'], | |
| plugins: [ | |
| typescript(), | |
| nodeResolve({browser: true}), | |
| commonjs(), | |
| postcss({ extensions: ['.css'], plugins: [postcss_url({url: 'inline'})] }), | |
| copy({ | |
| targets: [ | |
| { src: './manifest.json', dest: 'dist' }, | |
| { src: './styles.css', dest: 'dist' } | |
| ] | |
| }) | |
| ] | |
| }; |