Skip to content
This repository has been archived by the owner on Aug 19, 2021. It is now read-only.

Commit

Permalink
fix: Remove polyfill setting from transform runtime plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
kylealwyn committed Aug 7, 2018
1 parent 9e3633d commit 1cc3b79
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 30 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
],
"license": "MIT",
"scripts": {
"example": "cd example && yarn start",
"test": "jest",
"prebuild": "rimraf lib",
"build": "tsc --emitDeclarationOnly && babel src --out-dir lib --copy-files --extensions \".ts\"",
"build": "babel src --out-dir lib --copy-files --extensions \".ts\"",
"prepublishOnly": "npm run build",
"release": "standard-version"
},
Expand Down Expand Up @@ -56,6 +57,7 @@
"mini-css-extract-plugin": "0.4.1",
"node-sass": "4.9.2",
"object-assign": "4.1.1",
"object.values": "^1.0.4",
"optimize-css-assets-webpack-plugin": "5.0.0",
"postcss-flexbugs-fixes": "3.3.1",
"postcss-loader": "2.1.6",
Expand All @@ -80,7 +82,7 @@
"react-dom": "^16.0.0"
},
"devDependencies": {
"@babel/preset-typescript": "^7.0.0-beta.54",
"@babel/preset-typescript": "^7.0.0-beta.53",
"@types/autoprefixer": "^6.7.3",
"@types/case-sensitive-paths-webpack-plugin": "^2.1.2",
"@types/express": "^4.16.0",
Expand Down
4 changes: 4 additions & 0 deletions src/config/polyfills.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ require('whatwg-fetch');
// It will use the native implementation if it's present and isn't buggy.
Object.assign = require('object-assign');

if (!Object.values) {
require('object.values').shim();
}

// In tests, polyfill requestAnimationFrame since jsdom doesn't provide it yet.
// We don't polyfill it in the browser--this is user's responsibility.
if (process.env.NODE_ENV === 'test') {
Expand Down
22 changes: 12 additions & 10 deletions src/config/webpack.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,19 +132,22 @@ export default ({ mode, paths, env, sourceMaps }: IWebpackConfig): Configuration
use: [
// This loader parallelizes code compilation, it is optional but
// improves compile time on larger projects
{
loader: 'thread-loader',
options: {
poolTimeout: Infinity, // keep workers alive for more effective watch mode
},
},
// {
// loader: 'thread-loader',
// options: {
// poolTimeout: Infinity, // keep workers alive for more effective watch mode
// },
// },
{
loader: 'babel-loader',
options: {
presets: [
['@babel/preset-env', { useBuiltIns: 'entry', modules: false }],
['@babel/preset-react', { development: mode === 'development', useBuiltIns: true }],
'@babel/preset-flow'
['@babel/env', {
useBuiltIns: 'entry',
modules: false,
}],
['@babel/react', { development: mode === 'development', useBuiltIns: true }],
'@babel/flow'
],
plugins: [
['@babel/plugin-proposal-decorators', { legacy: true }],
Expand All @@ -155,7 +158,6 @@ export default ({ mode, paths, env, sourceMaps }: IWebpackConfig): Configuration
'@babel/plugin-transform-runtime',
{
helpers: false,
polyfill: false,
regenerator: true,
},
],
Expand Down
36 changes: 18 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,14 @@
version "7.0.0-beta.53"
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-beta.53.tgz#d64458636ffc258b42714a9dd93aeb6f8b8cf3ed"

"@babel/helper-plugin-utils@7.0.0-beta.54":
version "7.0.0-beta.54"
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-beta.54.tgz#61d2a9a0f9a3e31838a458debb9eebd7bdd249b4"

"@babel/helper-plugin-utils@7.0.0-beta.55":
version "7.0.0-beta.55"
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-beta.55.tgz#31f40777efd6b961da8496a923c22d2b062b3f73"

"@babel/helper-plugin-utils@7.0.0-beta.56":
version "7.0.0-beta.56"
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-beta.56.tgz#e5f63cae8b3b716825d64e69ad8b59d71cd2080c"

"@babel/helper-regex@7.0.0-beta.53":
version "7.0.0-beta.53"
resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.0.0-beta.53.tgz#6e9d2197b562779e225565946ae9a85c215b225e"
Expand Down Expand Up @@ -394,11 +394,11 @@
dependencies:
"@babel/helper-plugin-utils" "7.0.0-beta.53"

"@babel/plugin-syntax-typescript@7.0.0-beta.54":
version "7.0.0-beta.54"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.0.0-beta.54.tgz#7b01ddebccba8f78693bf2898e1f695bb8a76a7e"
"@babel/plugin-syntax-typescript@7.0.0-beta.56":
version "7.0.0-beta.56"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.0.0-beta.56.tgz#836a166feb51f955540f815bf936f99e17a2681e"
dependencies:
"@babel/helper-plugin-utils" "7.0.0-beta.54"
"@babel/helper-plugin-utils" "7.0.0-beta.56"

"@babel/plugin-transform-arrow-functions@7.0.0-beta.53":
version "7.0.0-beta.53"
Expand Down Expand Up @@ -622,12 +622,12 @@
dependencies:
"@babel/helper-plugin-utils" "7.0.0-beta.53"

"@babel/plugin-transform-typescript@7.0.0-beta.54":
version "7.0.0-beta.54"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.0.0-beta.54.tgz#7b614ba0dbea88b70ae82df9c429e128928c9251"
"@babel/plugin-transform-typescript@7.0.0-beta.56":
version "7.0.0-beta.56"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.0.0-beta.56.tgz#1357852a7ef303ca002b6ed7e4712578148edbeb"
dependencies:
"@babel/helper-plugin-utils" "7.0.0-beta.54"
"@babel/plugin-syntax-typescript" "7.0.0-beta.54"
"@babel/helper-plugin-utils" "7.0.0-beta.56"
"@babel/plugin-syntax-typescript" "7.0.0-beta.56"

"@babel/plugin-transform-unicode-regex@7.0.0-beta.53":
version "7.0.0-beta.53"
Expand Down Expand Up @@ -699,12 +699,12 @@
"@babel/plugin-transform-react-jsx-self" "7.0.0-beta.53"
"@babel/plugin-transform-react-jsx-source" "7.0.0-beta.53"

"@babel/preset-typescript@^7.0.0-beta.54":
version "7.0.0-beta.54"
resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.0.0-beta.54.tgz#7491df7c0f20d08ca63c41f78d2c722c92470391"
"@babel/preset-typescript@^7.0.0-beta.53":
version "7.0.0-beta.56"
resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.0.0-beta.56.tgz#eff0414072f018014f857c072a07e524088568b0"
dependencies:
"@babel/helper-plugin-utils" "7.0.0-beta.54"
"@babel/plugin-transform-typescript" "7.0.0-beta.54"
"@babel/helper-plugin-utils" "7.0.0-beta.56"
"@babel/plugin-transform-typescript" "7.0.0-beta.56"

"@babel/register@^7.0.0-beta.53":
version "7.0.0-beta.54"
Expand Down

0 comments on commit 1cc3b79

Please sign in to comment.