wrench: Updated rollup configuration
This updates the rollup config to avoid having the spread operator in the generated code as that causes issues when people want to bundle our code with webpack (which doesn't support the spread operator for object literals). This also changes the browserbuild script to avoid issues for people running this on Windows. Hat-tip to @philltew for this one. Note that this is the first plugin where I'm updating the rollup config. I'll have to do the same for all plugins and patterns, but it's unlikely I'll write this long a commit message for each one of them :)
This commit is contained in:
parent
9e12c25af4
commit
7695d738c2
3 changed files with 15 additions and 8 deletions
|
@ -1,23 +0,0 @@
|
|||
import { terser } from "rollup-plugin-terser";
|
||||
import babel from "rollup-plugin-babel";
|
||||
import resolve from "rollup-plugin-node-resolve";
|
||||
import json from "rollup-plugin-json";
|
||||
import { version, name, description, author, license } from "./package.json";
|
||||
|
||||
export default {
|
||||
input: "src/index.js",
|
||||
plugins: [
|
||||
resolve({
|
||||
browser: true
|
||||
}),
|
||||
json(),
|
||||
babel({
|
||||
exclude: "node_modules/**"
|
||||
}),
|
||||
terser({
|
||||
output: {
|
||||
preamble: `/**\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