Skip to content

Commit

Permalink
Update configs to fix polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
charrondev committed Sep 30, 2019
1 parent 820be43 commit b1bb3aa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions build/scripts/configs/makeBaseConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,21 @@ ${chalk.green(aliases)}`;
{
test: /\.(jsx?|tsx?)$/,
exclude: (modulePath: string) => {
const modulesRequiringTranspilation = ["quill", "p-debounce", "@vanilla/.*"];
const exlusionRegex = new RegExp(`node_modules/(${modulesRequiringTranspilation.join("|")})/`);
const modulesRequiringTranspilation = [
"quill",
"p-debounce",
"@vanilla/.*",
"react-redux",
"react-spring",
];
const exclusionRegex = new RegExp(`node_modules/(${modulesRequiringTranspilation.join("|")})/`);

if (modulePath.includes("core-js")) {
return true;
}

// We need to transpile quill's ES6 because we are building from source.
return /node_modules/.test(modulePath) && !exlusionRegex.test(modulePath);
return /node_modules/.test(modulePath) && !exclusionRegex.test(modulePath);
},
use: [
...hotLoaders,
Expand Down
2 changes: 1 addition & 1 deletion packages/vanilla-babel-preset/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const runtimePlugins =
];

if ((process.env.NODE_ENV = "production" || process.env.DEV_COMPAT === "compat")) {
envOptions.targets = "ie > 10, last 4 versions";
envOptions.targets = "ie > 10, last 4 versions, not dead, safari 8";
}

const preset = {
Expand Down

0 comments on commit b1bb3aa

Please sign in to comment.