Skip to content

Commit a32896a

Browse files
committed
feat: use spawn to build esm
1 parent e37573a commit a32896a

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ node_modules/
33
example-dist/
44
dist/
55
lib/
6+
esm/
67
types/
78
npm-debug.log*
89
yarn-debug.log*

build/build.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ webpack(webpackConfig, (err, stats) => {
3939
),
4040
);
4141
} else {
42+
const buildEsmProcess = spawn('npm', ['run', 'build:esm'], {
43+
stdio: 'inherit',
44+
});
45+
46+
buildEsmProcess.on('close', () => {
47+
console.log(chalk.cyan('Build esm complete.\n'));
48+
});
49+
4250
const buildTypesProcess = spawn('npm', ['run', 'build:dts'], {
4351
stdio: 'inherit',
4452
});

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
],
9494
"files": [
9595
"lib",
96+
"esm",
9697
"types"
9798
],
9899
"peerDependencies": {

0 commit comments

Comments
 (0)