diff --git a/.changeset/lovely-berries-pull.md b/.changeset/lovely-berries-pull.md new file mode 100644 index 0000000..434e096 --- /dev/null +++ b/.changeset/lovely-berries-pull.md @@ -0,0 +1,6 @@ +--- +'@dwarvesf/react-hooks': patch +'@dwarvesf/react-utils': patch +--- + +Fix module exports diff --git a/.github/workflows/size.yml b/.github/workflows/size.yml index b665848..0e2fa10 100644 --- a/.github/workflows/size.yml +++ b/.github/workflows/size.yml @@ -7,12 +7,16 @@ jobs: runs-on: ubuntu-latest steps: + - name: Setup Node.js 16 + uses: actions/setup-node@v4 + with: + node-version: 16 - uses: pnpm/action-setup@v2 with: version: 8.5.1 run_install: false - uses: actions/checkout@v3 - - uses: preactjs/compressed-size-action@v2 + - uses: preactjs/compressed-size-action@2.5.0 with: repo-token: '${{ secrets.GITHUB_TOKEN }}' build-script: 'build:packages' diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..6f7f377 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v16 diff --git a/packages/hooks/package.json b/packages/hooks/package.json index efe645d..a659a13 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -16,7 +16,7 @@ "lint": "tsdx lint" }, "main": "dist/index.js", - "module": "dist/react.esm.js", + "module": "dist/index.mjs", "typings": "dist/index.d.ts", "files": [ "README.md", diff --git a/packages/utils/package.json b/packages/utils/package.json index 51cea3c..173a553 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -16,7 +16,7 @@ "lint": "tsdx lint" }, "main": "dist/index.js", - "module": "dist/utils.esm.js", + "module": "dist/index.mjs", "typings": "dist/index.d.ts", "files": [ "README.md", diff --git a/tsdx.config.base.js b/tsdx.config.base.js index 8371afc..1c82a3b 100644 --- a/tsdx.config.base.js +++ b/tsdx.config.base.js @@ -5,7 +5,7 @@ module.exports = { config.output = { ...config.output, dir: 'dist/', - entryFileNames: '[name].esm.js', + entryFileNames: '[name].mjs', } delete config.output.file }