2020-08-03 09:30:48 +02:00
|
|
|
// rollup.config.js
|
|
|
|
import commonjs from "@rollup/plugin-commonjs";
|
|
|
|
import nodeResolve from "@rollup/plugin-node-resolve";
|
|
|
|
import json from "@rollup/plugin-json";
|
|
|
|
import builtins from "builtin-modules";
|
|
|
|
import pkg from "./package.json";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
input: "lib/index.js",
|
|
|
|
output: {
|
|
|
|
file: pkg.main,
|
|
|
|
format: "cjs",
|
|
|
|
},
|
|
|
|
external: builtins,
|
|
|
|
plugins: [
|
|
|
|
nodeResolve({
|
|
|
|
preferBuiltins: true,
|
|
|
|
}),
|
|
|
|
|
2020-08-06 17:36:56 +02:00
|
|
|
json(),
|
|
|
|
|
2020-08-03 09:30:48 +02:00
|
|
|
commonjs({
|
|
|
|
sourceMap: false,
|
2020-08-06 17:36:56 +02:00
|
|
|
transformMixedEsModules: true,
|
2020-08-03 09:30:48 +02:00
|
|
|
}),
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|