aboutsummaryrefslogtreecommitdiff
path: root/babel.config.js
diff options
context:
space:
mode:
authorPitu <[email protected]>2021-01-04 01:04:20 +0900
committerPitu <[email protected]>2021-01-04 01:04:20 +0900
commitfcd39dc550dec8dbcb8325e07e938c5024cbc33d (patch)
treef41acb4e0d5fd3c3b1236fe4324b3fef9ec6eafe /babel.config.js
parentCreate FUNDING.yml (diff)
parentchore: update todo (diff)
downloadhost.fuwn.me-fcd39dc550dec8dbcb8325e07e938c5024cbc33d.tar.xz
host.fuwn.me-fcd39dc550dec8dbcb8325e07e938c5024cbc33d.zip
Merge branch 'dev'
Diffstat (limited to 'babel.config.js')
-rw-r--r--babel.config.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/babel.config.js b/babel.config.js
new file mode 100644
index 0000000..1aa593c
--- /dev/null
+++ b/babel.config.js
@@ -0,0 +1,21 @@
+function isBabelLoader(caller) {
+ return caller && caller.name === 'babel-loader';
+}
+
+module.exports = function(api) {
+ if (api.env('test') && !api.caller(isBabelLoader)) {
+ return {
+ presets: [
+ [
+ '@babel/preset-env',
+ {
+ targets: {
+ node: 'current'
+ }
+ }
+ ]
+ ]
+ };
+ }
+ return {};
+};