chore: add nullish coalescing babel plugin
This commit is contained in:
parent
5c6ac8d92c
commit
cb238f99ec
|
@ -20,7 +20,11 @@ export default function rewriteBareModuleIdentifiers(code, packageConfig) {
|
||||||
// from the original file. This ensures minified
|
// from the original file. This ensures minified
|
||||||
// .mjs stays minified; see #149
|
// .mjs stays minified; see #149
|
||||||
retainLines: true,
|
retainLines: true,
|
||||||
plugins: [unpkgRewrite(origin, dependencies), "@babel/plugin-proposal-optional-chaining"]
|
plugins: [
|
||||||
|
unpkgRewrite(origin, dependencies),
|
||||||
|
"@babel/plugin-proposal-optional-chaining",
|
||||||
|
"@babel/plugin-proposal-nullish-coalescing-operator"
|
||||||
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
return babel.transform(code, options).code;
|
return babel.transform(code, options).code;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -13,6 +13,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.2.2",
|
"@babel/core": "^7.2.2",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.2.3",
|
"@babel/plugin-proposal-class-properties": "^7.2.3",
|
||||||
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.13",
|
||||||
"@babel/plugin-proposal-optional-chaining": "^7.12.7",
|
"@babel/plugin-proposal-optional-chaining": "^7.12.7",
|
||||||
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
||||||
"@babel/plugin-syntax-export-default-from": "^7.2.0",
|
"@babel/plugin-syntax-export-default-from": "^7.2.0",
|
||||||
|
|
Loading…
Reference in New Issue