Skip to content

Commit 1f81eea

Browse files
author
pooya parsa
committed
fix: transpile browser dist to ES5
fixes nuxt/nuxt#5743
1 parent 43b762d commit 1f81eea

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

.babelrc

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@
88
}
99
}]
1010
]
11-
}
11+
},
12+
"browser": {
13+
"presets": [
14+
[
15+
"@babel/preset-env",
16+
{
17+
"useBuiltIns": "entry",
18+
"corejs": { "version": 2 }
19+
}
20+
]
21+
]
22+
},
1223
}
1324
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"typings": "types/consola.d.ts",
1010
"scripts": {
1111
"build": "rm -rf dist && yarn build:node && yarn build:browser",
12-
"build:node": "bili src/node.js --file-name consola.js --format cjs --bundle-node-modules --minify --no-map",
13-
"build:browser": "bili src/browser.js --file-name consola.browser.js --format umd --module-name consola --bundle-node-modules --minify --no-map",
12+
"build:node": "NODE_ENV=node bili src/node.js --file-name consola.js --format cjs --bundle-node-modules --minify --no-map",
13+
"build:browser": "NODE_ENV=browser bili src/browser.js --file-name consola.browser.js --format umd --module-name consola --bundle-node-modules --minify --no-map",
1414
"demo": "node demo",
1515
"browser": "serve",
1616
"test": "yarn lint && yarn test:types && yarn build && jest test",

0 commit comments

Comments
 (0)