rollup.config.mjs (653B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 /* eslint-disable import/no-unresolved */ 6 import terser from "@rollup/plugin-terser"; 7 import nodeResolve from "@rollup/plugin-node-resolve"; 8 9 export default function (commandLineArgs) { 10 const plugins = [nodeResolve()]; 11 if (commandLineArgs.minified) { 12 plugins.push(terser()); 13 } 14 15 return { 16 input: "codemirror6/index.mjs", 17 output: { 18 file: "codemirror6/codemirror6.bundle.mjs", 19 format: "esm", 20 }, 21 plugins, 22 }; 23 }