Skip to content

Commit

Permalink
7.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Aug 9, 2023
1 parent 2313458 commit b2d98d8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const wavesurfer = WaveSurfer.create({

To import one of the plugins, e.g. the [Regions plugin](https://wavesurfer-js.org/examples/#regions.js):
```js
import Regions from 'wavesurfer.js/dist/plugins/regions.js'
import Regions from 'wavesurfer.js/plugins/regions'
```

Or as a script tag:
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wavesurfer.js",
"version": "7.1.1",
"version": "7.1.2",
"license": "BSD-3-Clause",
"author": "katspaugh",
"description": "Navigable audio waveform player",
Expand All @@ -21,24 +21,24 @@
"files": [
"dist"
],
"main": "./dist/wavesurfer.esm.js",
"main": "./dist/wavesurfer.js",
"unpkg": "./dist/wavesurfer.min.js",
"module": "./dist/wavesurfer.esm.js",
"browser": "./dist/wavesurfer.esm.js",
"module": "./dist/wavesurfer.js",
"browser": "./dist/wavesurfer.js",
"types": "./dist/wavesurfer.d.ts",
"exports": {
".": {
"import": "./dist/wavesurfer.esm.js",
"import": "./dist/wavesurfer.js",
"types": "./dist/wavesurfer.d.ts",
"require": "./dist/wavesurfer.cjs"
},
"./dist/plugins/*.js": {
"import": "./dist/plugins/*.esm.js",
"import": "./dist/plugins/*.js",
"types": "./dist/plugins/*.d.ts",
"require": "./dist/plugins/*.cjs"
},
"./plugins/*": {
"import": "./dist/plugins/*.esm.js",
"import": "./dist/plugins/*.js",
"types": "./dist/plugins/*.d.ts",
"require": "./dist/plugins/*.cjs"
},
Expand Down
11 changes: 10 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ export default [
.sync('src/plugins/*.ts')
.map((plugin) => [
// ES module
{
input: plugin,
output: {
file: plugin.replace('src/', 'dist/').replace('.ts', '.js'),
format: 'esm',
},
plugins,
},
// ES module again but with an .esm.js extension
{
input: plugin,
output: {
Expand All @@ -49,7 +58,7 @@ export default [
},
plugins,
},
// CommonJS module (Node.js
// CommonJS module (Node.js)
{
input: plugin,
output: {
Expand Down

0 comments on commit b2d98d8

Please sign in to comment.