Updating build process to fix issues with polyfill.
This commit is contained in:
parent
18fd079c64
commit
0e93c4b7f8
|
@ -25,7 +25,6 @@
|
||||||
"rollup-plugin-commonjs": "^10.1.0",
|
"rollup-plugin-commonjs": "^10.1.0",
|
||||||
"rollup-plugin-node-builtins": "^2.1.2",
|
"rollup-plugin-node-builtins": "^2.1.2",
|
||||||
"rollup-plugin-node-globals": "^1.4.0",
|
"rollup-plugin-node-globals": "^1.4.0",
|
||||||
"rollup-plugin-node-polyfills": "^0.2.1",
|
|
||||||
"rollup-plugin-node-resolve": "^5.2.0",
|
"rollup-plugin-node-resolve": "^5.2.0",
|
||||||
"typescript": "^4.1.3"
|
"typescript": "^4.1.3"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +1,26 @@
|
||||||
import commonjs from "rollup-plugin-commonjs"
|
import commonjs from "rollup-plugin-commonjs"
|
||||||
import globals from "rollup-plugin-node-globals"
|
|
||||||
import builtins from "rollup-plugin-node-builtins"
|
|
||||||
import polyfills from "rollup-plugin-node-polyfills"
|
|
||||||
import resolve from "rollup-plugin-node-resolve"
|
import resolve from "rollup-plugin-node-resolve"
|
||||||
|
import builtins from "rollup-plugin-node-builtins"
|
||||||
|
import globals from "rollup-plugin-node-globals"
|
||||||
import json from "@rollup/plugin-json"
|
import json from "@rollup/plugin-json"
|
||||||
|
|
||||||
|
const production = !process.env.ROLLUP_WATCH
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
input: "src/index.js",
|
input: "src/index.js",
|
||||||
output: {
|
output: [
|
||||||
file: "dist/bundle.js",
|
{
|
||||||
format: "umd",
|
sourcemap: true,
|
||||||
name: "string-templates",
|
format: "umd",
|
||||||
exports: "named",
|
file: "./dist/bundle.js",
|
||||||
globals: {
|
name: "string-templates",
|
||||||
fs: "fs",
|
exports: "named",
|
||||||
},
|
},
|
||||||
},
|
],
|
||||||
treeshake: true,
|
|
||||||
external: ["fs"],
|
|
||||||
plugins: [
|
plugins: [
|
||||||
polyfills(),
|
|
||||||
resolve({
|
resolve({
|
||||||
preferBuiltins: false
|
preferBuiltins: true,
|
||||||
|
browser: true,
|
||||||
}),
|
}),
|
||||||
commonjs(),
|
commonjs(),
|
||||||
globals(),
|
globals(),
|
||||||
|
|
Loading…
Reference in New Issue