babel-preset-kyt-core
Advanced tools
Comparing version 0.3.0-alpha.2 to 0.3.0-alpha.3
@@ -5,3 +5,2 @@ /* eslint-disable vars-on-top */ | ||
var babelTransformRuntime = require('babel-plugin-transform-runtime'); | ||
var babelTransformModules = require('babel-plugin-transform-es2015-modules-commonjs'); | ||
var babelSyntaxDynamicImport = require('babel-plugin-syntax-dynamic-import'); | ||
@@ -30,4 +29,10 @@ var merge = require('lodash.merge'); | ||
var testEnvOptions = { | ||
targets: { | ||
node: true, | ||
}, | ||
}; | ||
// Derive the babel-preset-env options based on the type of environment | ||
// we are in, client or server. Give the ability to users to override | ||
// we are in, client, server or test. Give the ability to users to override | ||
// the default environments in their own configurations, for example: | ||
@@ -38,3 +43,4 @@ // | ||
// "client": { ... }, | ||
// "server": { ... } | ||
// "server": { ... }, | ||
// "test": { ... } | ||
// } | ||
@@ -47,2 +53,4 @@ // }]] | ||
envOptions = merge({}, serverEnvOptions, userEnvOptions.server ? userEnvOptions.server : {}); | ||
} else if (process.env.KYT_ENV_TYPE === 'test') { | ||
envOptions = merge({}, testEnvOptions, userEnvOptions.test ? userEnvOptions.test : {}); | ||
} else { | ||
@@ -61,9 +69,3 @@ envOptions = clientEnvOptions; | ||
].filter(Boolean), | ||
env: { | ||
test: { | ||
plugins: [[babelTransformModules, { loose: true }]], | ||
}, | ||
}, | ||
}; | ||
}; |
{ | ||
"name": "babel-preset-kyt-core", | ||
"version": "0.3.0-alpha.2", | ||
"version": "0.3.0-alpha.3", | ||
"description": "An opinionated babel preset, best used with kyt", | ||
@@ -13,3 +13,2 @@ "main": "lib/index.js", | ||
"babel-plugin-syntax-dynamic-import": "6.18.0", | ||
"babel-plugin-transform-es2015-modules-commonjs": "6.26.0", | ||
"babel-plugin-transform-runtime": "6.23.0", | ||
@@ -16,0 +15,0 @@ "babel-preset-env": "1.6.0" |
@@ -29,2 +29,6 @@ ## babel-preset-kyt-core | ||
### `0.3.0-alpha.3` - 09/19/17 | ||
- Adds `KYT_ENV_TYPE=test` support for `test` runs. Similar to the `client/server` options, the `test` option can be overridden in `envOptions`. | ||
### `0.3.0-alpha.2` - 09/18/17 | ||
@@ -31,0 +35,0 @@ |
Sorry, the diff of this file is not supported yet
3
97
98
7581
7
+ Addedbabel-plugin-transform-es2015-modules-commonjs@6.26.2(transitive)
- Removedbabel-plugin-transform-es2015-modules-commonjs@6.26.0
- Removedbabel-plugin-transform-es2015-modules-commonjs@6.26.0(transitive)