Skip to content

Commit 2da44fd

Browse files
committed
🐛 fix: fix missing module.exports when migration to father4
1 parent 580c32e commit 2da44fd

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.fatherrc.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { defineConfig } from 'father';
22

33
export default defineConfig({
4-
cjs: { output: 'lib' },
5-
// extraBabelPlugins: ['add-module-exports'],
4+
cjs: { output: 'lib', platform: 'browser' },
5+
extraBabelPlugins: ['add-module-exports'],
66
});

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"@types/sinon": "^10.0.0",
4646
"@umijs/max": "^4",
4747
"@umijs/test": "^4",
48+
"babel-plugin-add-module-exports": "^1",
4849
"commitlint": "^17",
4950
"commitlint-config-gitmoji": "^2",
5051
"conventional-changelog-gitmoji-config": "^1",

packages/commitlint-config/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ npm i -D commitlint-config-gitmoji commitlint
3232
or
3333

3434
```
35-
# use yarn
36-
yarn add -D commitlint-config-gitmoji commitlint
35+
# use pnpm
36+
pnpm i -D commitlint-config-gitmoji commitlint
3737
```
3838

3939
### Config
4040

4141
Add commitlint config for Gitmoji
4242

4343
```sh
44-
echo "module.exports = {extends: ['gitmoji']};" > .commitlintrc.js
44+
echo "module.exports = {extends: ['gitmoji']};" > commitlint.config.js
4545
```
4646

4747
## Commit style

0 commit comments

Comments
 (0)