Skip to content

Commit 6d8284f

Browse files
committed
fix(module): pointed to a proper esm bundle
and linted to avoid miswiring such details again in the future
1 parent 924faf9 commit 6d8284f

File tree

3 files changed

+150
-5
lines changed

3 files changed

+150
-5
lines changed

package-lock.json

Lines changed: 142 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
"repository": "form8ion/react-components-scaffolder",
88
"bugs": "https://github.com/form8ion/react-components-scaffolder/issues",
99
"homepage": "https://npm.im/@form8ion/react-components-scaffolder",
10-
"main": "lib/index.cjs.js",
11-
"module": "lib/index.es.js",
10+
"main": "./lib/index.js",
11+
"module": "./lib/index.mjs",
1212
"sideEffects": false,
1313
"scripts": {
14+
"pretest": "run-s build",
1415
"test": "npm-run-all --print-label --parallel lint:* --parallel test:*",
1516
"lint:lockfile": "lockfile-lint --path package-lock.json --type npm --validate-https --allowed-hosts npm",
1617
"lint:js": "eslint . --cache",
@@ -31,7 +32,8 @@
3132
"test:integration:debug": "DEBUG=test run-s test:integration",
3233
"test:integration:wip": "run-s 'test:integration:base -- --profile wip'",
3334
"test:integration:focus": "run-s 'test:integration:base -- --profile focus'",
34-
"prepare": "husky install"
35+
"prepare": "husky install",
36+
"lint:publish": "publint --strict"
3537
},
3638
"files": [
3739
"lib/",
@@ -67,6 +69,7 @@
6769
"lockfile-lint": "4.10.6",
6870
"mocha": "10.2.0",
6971
"npm-run-all": "4.1.5",
72+
"publint": "0.1.16",
7073
"remark-cli": "11.0.0",
7174
"rimraf": "5.0.1",
7275
"rollup": "3.26.2",

rollup.config.js renamed to rollup.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
input: 'src/index.js',
77
plugins: [autoExternal(), nodeResolve({mainFields: ['module']})],
88
output: [
9-
{file: 'lib/index.cjs.js', format: 'cjs', sourcemap: true},
10-
{file: 'lib/index.es.js', format: 'es', sourcemap: true}
9+
{file: 'lib/index.js', format: 'cjs', sourcemap: true},
10+
{file: 'lib/index.mjs', format: 'esm', sourcemap: true}
1111
]
1212
};

0 commit comments

Comments
 (0)