Skip to content

Commit

Permalink
Remove umd.js file from build (#64)
Browse files Browse the repository at this point in the history
* Remove umd.js file from build

* Add type module in package.json
  • Loading branch information
samhirtarif authored Jul 11, 2023
1 parent 070e0c2 commit a76b423
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 23 deletions.
30 changes: 15 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "react-audio-voice-recorder",
"private": false,
"version": "2.0.0",
"version": "2.1.0",
"type": "module",
"license": "MIT",
"author": "",
"repository": {
Expand Down Expand Up @@ -30,16 +31,13 @@
"mpeg"
],
"files": [
"dist",
"README.md"
"dist"
],
"main": "./dist/react-audio-voice-recorder.umd.js",
"module": "./dist/react-audio-voice-recorder.es.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": "./dist/react-audio-voice-recorder.es.js",
"require": "./dist/react-audio-voice-recorder.umd.js"
"import": "./dist/react-audio-voice-recorder.es.js"
}
},
"scripts": {
Expand Down Expand Up @@ -97,6 +95,6 @@
},
"dependencies": {
"@ffmpeg/ffmpeg": "^0.11.6",
"react-audio-visualize": "^1.1.2"
"react-audio-visualize": "^1.1.3"
}
}
3 changes: 2 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export default defineConfig({
lib: {
entry: path.resolve(__dirname, 'src/index.tsx'),
name: 'AudioRecorder',
fileName: (format) => `react-audio-voice-recorder.${format}.js`
fileName: (format) => `react-audio-voice-recorder.${format}.js`,
formats: ["es"]
},
rollupOptions: {
external: ['react', 'react-dom'],
Expand Down

0 comments on commit a76b423

Please sign in to comment.