diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 31159bd87a..abc3efc51a 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -25,7 +25,6 @@ "rollup-plugin-commonjs": "^10.1.0", "rollup-plugin-node-builtins": "^2.1.2", "rollup-plugin-node-globals": "^1.4.0", - "rollup-plugin-node-polyfills": "^0.2.1", "rollup-plugin-node-resolve": "^5.2.0", "typescript": "^4.1.3" } diff --git a/packages/string-templates/rollup.config.js b/packages/string-templates/rollup.config.js index 75a9c1ada9..6ca34c5dfe 100644 --- a/packages/string-templates/rollup.config.js +++ b/packages/string-templates/rollup.config.js @@ -1,27 +1,26 @@ 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 builtins from "rollup-plugin-node-builtins" +import globals from "rollup-plugin-node-globals" import json from "@rollup/plugin-json" +const production = !process.env.ROLLUP_WATCH + export default { input: "src/index.js", - output: { - file: "dist/bundle.js", - format: "umd", - name: "string-templates", - exports: "named", - globals: { - fs: "fs", + output: [ + { + sourcemap: true, + format: "umd", + file: "./dist/bundle.js", + name: "string-templates", + exports: "named", }, - }, - treeshake: true, - external: ["fs"], + ], plugins: [ - polyfills(), resolve({ - preferBuiltins: false + preferBuiltins: true, + browser: true, }), commonjs(), globals(),