✨ Added Benjamin pattern by @woutervdub
This commit is contained in:
parent
e58f222493
commit
6ccda91f77
17 changed files with 11591 additions and 0 deletions
59
packages/benjamin/rollup.config.js
Normal file
59
packages/benjamin/rollup.config.js
Normal file
|
@ -0,0 +1,59 @@
|
|||
import babel from "rollup-plugin-babel";
|
||||
import resolve from "rollup-plugin-node-resolve";
|
||||
import commonjs from "rollup-plugin-commonjs";
|
||||
import json from "rollup-plugin-json";
|
||||
import minify from "rollup-plugin-babel-minify";
|
||||
import yaml from "rollup-plugin-yaml";
|
||||
import url from "rollup-plugin-url";
|
||||
import postcss from "rollup-plugin-postcss";
|
||||
import svgr from "@svgr/rollup";
|
||||
import peerDepsExternal from "rollup-plugin-peer-deps-external";
|
||||
import {
|
||||
name,
|
||||
version,
|
||||
description,
|
||||
author,
|
||||
license,
|
||||
main,
|
||||
module
|
||||
} from "./package.json";
|
||||
|
||||
const output = [
|
||||
{
|
||||
file: main,
|
||||
format: "cjs",
|
||||
sourcemap: true
|
||||
}
|
||||
];
|
||||
if (typeof module !== "undefined")
|
||||
output.push({
|
||||
file: module,
|
||||
format: "es",
|
||||
sourcemap: true
|
||||
});
|
||||
|
||||
export default {
|
||||
input: "src/index.js",
|
||||
output,
|
||||
plugins: [
|
||||
peerDepsExternal(),
|
||||
resolve({ modulesOnly: true }),
|
||||
url(),
|
||||
commonjs(),
|
||||
json(),
|
||||
yaml(),
|
||||
svgr(),
|
||||
postcss({
|
||||
modules: true
|
||||
}),
|
||||
babel({
|
||||
exclude: "node_modules/**",
|
||||
plugins: ["@babel/plugin-proposal-object-rest-spread"]
|
||||
}),
|
||||
minify({
|
||||
comments: false,
|
||||
sourceMap: true,
|
||||
banner: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
||||
})
|
||||
]
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue