Skip to content

Commit a76b423

Browse files
authored
Remove umd.js file from build (#64)
* Remove umd.js file from build * Add type module in package.json
1 parent 070e0c2 commit a76b423

File tree

3 files changed

+22
-23
lines changed

3 files changed

+22
-23
lines changed

package-lock.json

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

package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "react-audio-voice-recorder",
33
"private": false,
4-
"version": "2.0.0",
4+
"version": "2.1.0",
5+
"type": "module",
56
"license": "MIT",
67
"author": "",
78
"repository": {
@@ -30,16 +31,13 @@
3031
"mpeg"
3132
],
3233
"files": [
33-
"dist",
34-
"README.md"
34+
"dist"
3535
],
36-
"main": "./dist/react-audio-voice-recorder.umd.js",
3736
"module": "./dist/react-audio-voice-recorder.es.js",
3837
"types": "./dist/index.d.ts",
3938
"exports": {
4039
".": {
41-
"import": "./dist/react-audio-voice-recorder.es.js",
42-
"require": "./dist/react-audio-voice-recorder.umd.js"
40+
"import": "./dist/react-audio-voice-recorder.es.js"
4341
}
4442
},
4543
"scripts": {
@@ -97,6 +95,6 @@
9795
},
9896
"dependencies": {
9997
"@ffmpeg/ffmpeg": "^0.11.6",
100-
"react-audio-visualize": "^1.1.2"
98+
"react-audio-visualize": "^1.1.3"
10199
}
102100
}

vite.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ export default defineConfig({
3737
lib: {
3838
entry: path.resolve(__dirname, 'src/index.tsx'),
3939
name: 'AudioRecorder',
40-
fileName: (format) => `react-audio-voice-recorder.${format}.js`
40+
fileName: (format) => `react-audio-voice-recorder.${format}.js`,
41+
formats: ["es"]
4142
},
4243
rollupOptions: {
4344
external: ['react', 'react-dom'],

0 commit comments

Comments
 (0)