diff --git a/package.json b/package.json index 41f02b65..6fcd4af3 100644 --- a/package.json +++ b/package.json @@ -6,11 +6,11 @@ "bundlesize": [ { "path": "./packages/component/dist/loadable.min.js", - "maxSize": "2 kB" + "maxSize": "2.5 kB" }, { "path": "./packages/component/dist/loadable.esm.js", - "maxSize": "3 kB" + "maxSize": "3.5 kB" } ], "scripts": { diff --git a/packages/component/.size-snapshot.json b/packages/component/.size-snapshot.json index 3b6709e9..ed4b4e3f 100644 --- a/packages/component/.size-snapshot.json +++ b/packages/component/.size-snapshot.json @@ -1,20 +1,20 @@ { "dist/loadable.cjs.js": { - "bundled": 10177, - "minified": 5008, - "gzipped": 1931 + "bundled": 12669, + "minified": 6097, + "gzipped": 2189 }, "dist/loadable.esm.js": { - "bundled": 9858, - "minified": 4743, - "gzipped": 1857, + "bundled": 12286, + "minified": 5788, + "gzipped": 2122, "treeshaked": { "rollup": { - "code": 3158, - "import_statements": 60 + "code": 259, + "import_statements": 259 }, "webpack": { - "code": 4211 + "code": 5063 } } } diff --git a/packages/component/rollup.config.js b/packages/component/rollup.config.js index 570270f3..5a480b95 100644 --- a/packages/component/rollup.config.js +++ b/packages/component/rollup.config.js @@ -19,7 +19,10 @@ const external = id => !id.startsWith('.') && !id.startsWith('/') const getBabelOptions = ({ useESModules }) => ({ exclude: '**/node_modules/**', runtimeHelpers: true, - presets: [['@babel/preset-react', { useBuiltIns: true }]], + presets: [ + ['@babel/preset-env', { loose: true }], + ['@babel/preset-react', { useBuiltIns: true }], + ], plugins: [ '@babel/plugin-proposal-class-properties', 'babel-plugin-annotate-pure-calls',