diff --git a/.github/workflows/index.yaml b/.github/workflows/index.yaml index 24fe3c8..d4fe677 100644 --- a/.github/workflows/index.yaml +++ b/.github/workflows/index.yaml @@ -20,6 +20,10 @@ jobs: - run: npm run lint - run: npm run build - run: npm run test + - name: module test + run: | + node --input-type=module --eval "import * as m from '@abraham/reflection'; console.log(m)" + node --input-type=commonjs --eval "const m = require('@abraham/reflection'); console.log(m)" - run: npm run pkg-ok - uses: coverallsapp/github-action@master with: diff --git a/package.json b/package.json index c4fd459..58f4c94 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,9 @@ "type": "module", "exports": { "import": "./dist/index.js", - "require": "./dist/index.umd.js" + "require": "./dist/index.umd.cjs" }, - "main": "./dist/index.umd.js", + "main": "./dist/index.umd.cjs", "module": "./dist/index.js", "types": "./dist/index.d.ts", "scripts": { @@ -80,7 +80,7 @@ "rollup": { "input": "dist/index.js", "output": { - "file": "dist/index.umd.js", + "file": "dist/index.umd.cjs", "format": "umd", "name": "@abraham/reflection" }