From 50ff66f86f93d2be60655cadefe7a22551114784 Mon Sep 17 00:00:00 2001 From: Justin Schroeder Date: Fri, 28 Feb 2020 11:19:44 -0500 Subject: [PATCH] Improves minified browser build --- build/rollup.config.js | 14 +++++++------- build/rollup.iife.config.js | 7 +++---- dist/formulate.esm.js | 2 +- dist/formulate.min.js | 6 +++--- dist/formulate.umd.js | 2 +- src/FileUpload.js | 2 +- src/Formulate.js | 1 + src/FormulateInput.vue | 2 +- src/libs/context.js | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/build/rollup.config.js b/build/rollup.config.js index 1dc827f..3c33b46 100644 --- a/build/rollup.config.js +++ b/build/rollup.config.js @@ -8,14 +8,14 @@ export default { input: 'src/Formulate.js', // Path relative to package.json output: { name: 'Formulate', - exports: 'named' - // globals: { - // 'is-plain-object': 'isPlainObject', - // 'nanoid': 'nanoid', - // 'is-url': 'isUrl' - // } + exports: 'named', + globals: { + 'is-plain-object': 'isPlainObject', + 'nanoid/non-secure': 'nanoid', + 'is-url': 'isUrl' + } }, - // external: ['is-plain-object', 'nanoid', 'is-url'], + external: ['nanoid/non-secure'], plugins: [ commonjs(), autoExternal(), diff --git a/build/rollup.iife.config.js b/build/rollup.iife.config.js index 0e34746..a6d69d0 100644 --- a/build/rollup.iife.config.js +++ b/build/rollup.iife.config.js @@ -13,9 +13,8 @@ export default { format: 'iife', globals: { 'is-plain-object': 'isPlainObject', - 'nanoid': 'nanoid', - 'is-url': 'isUrl', - 'crypto': 'crypto' + 'nanoid/non-secure': 'nanoid', + 'is-url': 'isUrl' } }, plugins: [ @@ -24,7 +23,7 @@ export default { preferBuiltins: false }), commonjs(), - internal(['is-plain-object', 'nanoid', 'is-url', 'crypto']), + internal(['is-plain-object', 'nanoid/non-secure', 'is-url']), vue({ css: true, // Dynamically inject css as a