Comparing version 0.4.168 to 0.4.169
@@ -14,5 +14,6 @@ "use strict"; | ||
if (builder.stack.hasAny(['babel', 'es6']) && !builder.stack.hasAny('dll')) { | ||
var isBabel7 = builder.require.probe('@babel/core') && builder.require.probe('@babel/preset-flow'); | ||
builder.config = spin.merge({ | ||
entry: { | ||
index: ['babel-polyfill'] | ||
index: [isBabel7 ? '@babel/polyfill' : 'babel-polyfill'] | ||
} | ||
@@ -30,3 +31,3 @@ }, builder.config); | ||
options: !!babelrc | ||
? { babelrc: true, cacheDirectory: cacheDirectory } | ||
? { babelrc: true, cacheDirectory: cacheDirectory, rootMode: 'upward-optional' } | ||
: spin.createConfig(builder, 'babel', { | ||
@@ -33,0 +34,0 @@ babelrc: false, |
@@ -208,3 +208,6 @@ "use strict"; | ||
config = __assign({}, config, { target: 'node', externals: function (context, request, callback) { | ||
if (request.indexOf('webpack') < 0 && request.indexOf('babel-polyfill') < 0 && !request.startsWith('.')) { | ||
if (request.indexOf('webpack') < 0 && | ||
request.indexOf('babel-polyfill') < 0 && | ||
request.indexOf('@babel/polyfill') < 0 && | ||
!request.startsWith('.')) { | ||
var fullPath = builder.require.probe(request, context); | ||
@@ -211,0 +214,0 @@ if (fullPath) { |
{ | ||
"name": "spinjs", | ||
"version": "0.4.168", | ||
"version": "0.4.169", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -17,6 +17,7 @@ import * as path from 'path'; | ||
if (builder.stack.hasAny(['babel', 'es6']) && !builder.stack.hasAny('dll')) { | ||
const isBabel7 = builder.require.probe('@babel/core') && builder.require.probe('@babel/preset-flow'); | ||
builder.config = spin.merge( | ||
{ | ||
entry: { | ||
index: ['babel-polyfill'] | ||
index: [isBabel7 ? '@babel/polyfill' : 'babel-polyfill'] | ||
} | ||
@@ -41,3 +42,3 @@ }, | ||
options: !!babelrc | ||
? { babelrc: true, cacheDirectory } | ||
? { babelrc: true, cacheDirectory, rootMode: 'upward-optional' } | ||
: spin.createConfig(builder, 'babel', { | ||
@@ -44,0 +45,0 @@ babelrc: false, |
@@ -260,3 +260,8 @@ import * as humps from 'humps'; | ||
externals: (context, request, callback) => { | ||
if (request.indexOf('webpack') < 0 && request.indexOf('babel-polyfill') < 0 && !request.startsWith('.')) { | ||
if ( | ||
request.indexOf('webpack') < 0 && | ||
request.indexOf('babel-polyfill') < 0 && | ||
request.indexOf('@babel/polyfill') < 0 && | ||
!request.startsWith('.') | ||
) { | ||
const fullPath = builder.require.probe(request, context); | ||
@@ -263,0 +268,0 @@ if (fullPath) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
460525
7698