Skip to content

Instantly share code, notes, and snippets.

@remarkablemark
Created August 22, 2021 00:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save remarkablemark/1523aba15906ca47f1521c639045852f to your computer and use it in GitHub Desktop.
Save remarkablemark/1523aba15906ca47f1521c639045852f to your computer and use it in GitHub Desktop.
// rollup.config.js
import commonjs from '@rollup/plugin-commonjs';
import import resolve from '@rollup/plugin-node-resolve';
import { terser } from 'rollup-plugin-terser';
+import json from '@rollup/plugin-json';
const config = {
input: 'index.js',
output: {
format: 'umd',
name: 'MyModuleName',
},
- plugins: [commonjs(), resolve(), terser()],
+ plugins: [commonjs(), resolve(), terser(), json()],
};
export default config;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment