diff --git a/packages/component/.size-snapshot.json b/packages/component/.size-snapshot.json index 381cedb90..25a05247b 100644 --- a/packages/component/.size-snapshot.json +++ b/packages/component/.size-snapshot.json @@ -4,7 +4,7 @@ "minified": 7394, "gzipped": 2621 }, - "dist/loadable.esm.js": { + "dist/loadable.esm.mjs": { "bundled": 16434, "minified": 7090, "gzipped": 2552, diff --git a/packages/component/package.json b/packages/component/package.json index 8b42f5a25..7bd296d34 100644 --- a/packages/component/package.json +++ b/packages/component/package.json @@ -2,8 +2,15 @@ "name": "@loadable/component", "description": "React code splitting made easy.", "version": "5.15.3", - "main": "dist/loadable.cjs.js", - "module": "dist/loadable.esm.js", + "main": "./dist/loadable.cjs.js", + "module": "./dist/loadable.esm.mjs", + "exports": { + ".": { + "require": "./dist/loadable.cjs.js", + "import": "./dist/loadable.esm.mjs", + "default": "./dist/loadable.cjs.js" + } + }, "repository": "git@github.com:gregberge/loadable-components.git", "author": "Greg Bergé ", "publishConfig": { diff --git a/packages/server/__fixtures__/stats.json b/packages/server/__fixtures__/stats.json index da2f3b2e6..d75969d36 100644 --- a/packages/server/__fixtures__/stats.json +++ b/packages/server/__fixtures__/stats.json @@ -1,7 +1,7 @@ { "errors": [], "warnings": [], - "hash": "84e08a1809b7b09283e2", + "hash": "6cacb38ddc45b9bbd140", "publicPath": "/dist/node/", "outputPath": "../../examples/server-side-rendering/public/dist/node", "assetsByChunkName": {