diff --git a/build.ts b/build.ts index 0a3bba5f..3fd08f89 100644 --- a/build.ts +++ b/build.ts @@ -16,6 +16,6 @@ build({ build({ ...shared, - outfile: 'lib/index.esm.js', + outfile: 'lib/index.mjs', format: 'esm', }); diff --git a/package.json b/package.json index abdeb947..bcd2042d 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,15 @@ "description": "Thread-safe Helmet for React 16+ and friends", "sideEffects": false, "main": "./lib/index.js", - "module": "./lib/index.esm.js", + "module": "./lib/index.mjs", "typings": "./lib/index.d.ts", + "exports": { + ".": { + "types": "./lib/index.d.ts", + "import": "./lib/index.mjs", + "require": "./lib/index.js" + } + }, "repository": "http://github.com/staylor/react-helmet-async", "author": "Scott Taylor ", "license": "Apache-2.0",