Use ES6 build of web-streams-polyfill in non-compat builds
This commit is contained in:
parent
ab0892bd64
commit
76ce33d96b
|
@ -47,8 +47,8 @@ module.exports = function(grunt) {
|
||||||
transform: [
|
transform: [
|
||||||
["babelify", {
|
["babelify", {
|
||||||
global: true,
|
global: true,
|
||||||
// Only babelify web-stream-tools, asmcrypto, address-rfc2822 and seek-bzip in node_modules
|
// Only babelify web-streams-polyfill, web-stream-tools, asmcrypto, address-rfc2822 and seek-bzip in node_modules
|
||||||
only: /^(?:.*\/node_modules\/web-stream-tools\/|.*\/node_modules\/asmcrypto\.js\/|.*\/node_modules\/address-rfc2822\/|.*\/node_modules\/seek-bzip\/|(?!.*\/node_modules\/)).*$/,
|
only: /^(?:.*\/node_modules\/@mattiasbuelens\/web-streams-polyfill\/|.*\/node_modules\/web-stream-tools\/|.*\/node_modules\/asmcrypto\.js\/|.*\/node_modules\/address-rfc2822\/|.*\/node_modules\/seek-bzip\/|(?!.*\/node_modules\/)).*$/,
|
||||||
plugins: compat ? [
|
plugins: compat ? [
|
||||||
"transform-async-to-generator",
|
"transform-async-to-generator",
|
||||||
"syntax-async-functions",
|
"syntax-async-functions",
|
||||||
|
|
|
@ -52,7 +52,7 @@ if (typeof window !== 'undefined') {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof TransformStream === 'undefined') {
|
if (typeof TransformStream === 'undefined') {
|
||||||
require('@mattiasbuelens/web-streams-polyfill');
|
require('@mattiasbuelens/web-streams-polyfill/es6');
|
||||||
}
|
}
|
||||||
if (typeof TextEncoder === 'undefined') {
|
if (typeof TextEncoder === 'undefined') {
|
||||||
const nodeUtil = util.nodeRequire('util') || {};
|
const nodeUtil = util.nodeRequire('util') || {};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user