Skip to content

Commit

Permalink
Use export syntax supported by Webpack v4 (Fixes #228)
Browse files Browse the repository at this point in the history
  • Loading branch information
eemeli committed Mar 13, 2021
1 parent 3736eb7 commit 0490d44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion browser/index.js
@@ -1,2 +1,5 @@
export * as default from './dist/index.js'
// `export * as default from ...` fails on Webpack v4
// https://github.com/eemeli/yaml/issues/228
import * as YAML from './dist/index.js'
export default YAML
export * from './dist/index.js'
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -18,9 +18,9 @@
"type": "commonjs",
"main": "./dist/index.js",
"browser": {
"./index.js": "./browser/index.js",
"./util.js": "./browser/dist/util.js",
"./util.mjs": "./browser/dist/util.js"
"./dist/index.js": "./browser/index.js",
"./dist/util.js": "./browser/dist/util.js",
"./util.js": "./browser/dist/util.js"
},
"exports": {
".": {
Expand Down

0 comments on commit 0490d44

Please sign in to comment.