Skip to content

Commit

Permalink
chore: update babel config and pkgs with ie11 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyFong committed Jun 5, 2020
1 parent 7995f6d commit 27a9440
Show file tree
Hide file tree
Showing 8 changed files with 319 additions and 4,688 deletions.
4 changes: 0 additions & 4 deletions webapp/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
* >>
*/

import '@babel/polyfill'
import 'url-search-params-polyfill'
import 'array-flat-polyfill'

import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
Expand Down
1 change: 1 addition & 0 deletions webapp/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<meta charset="utf-8">
<!-- Make the page mobile compatible -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

<!-- Allow installing the app to the homescreen -->
<meta name="mobile-web-app-capable" content="yes">
Expand Down
19 changes: 18 additions & 1 deletion webapp/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
module.exports = {
ignore: [
/\/core-js/,
/webpack\/buildin/
],
overrides: [{
test: "./node_modules",
}],
sourceType: "unambiguous",
presets: [
[
'@babel/preset-env',
{
modules: false
modules: false,
useBuiltIns: 'usage',
corejs: {
version: 3,
proposals: true
},
targets: {
"chrome": 58,
"ie": 11
}
}
],
'@babel/preset-react',
Expand Down
2 changes: 0 additions & 2 deletions webapp/internals/webpack/webpack.dev.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ module.exports = require('./webpack.base.babel')({
// Add hot reloading in development
entry: {
app: [
require.resolve('react-app-polyfill/ie11'),
'webpack-hot-middleware/client?reload=true',
path.join(process.cwd(), 'app/app.tsx') // Start with js/app.js
],
share: [
require.resolve('react-app-polyfill/ie11'),
'webpack-hot-middleware/client?reload=true',
path.join(process.cwd(), 'share/app.tsx')
]
Expand Down
2 changes: 0 additions & 2 deletions webapp/internals/webpack/webpack.prod.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ module.exports = require('./webpack.base.babel')({
// In production, we skip all hot-reloading stuff
entry: {
app: [
require.resolve('react-app-polyfill/ie11'),
path.join(process.cwd(), 'app/app.tsx')
],
share: [
require.resolve('react-app-polyfill/ie11'),
path.join(process.cwd(), 'share/app.tsx')
]
},
Expand Down
Loading

0 comments on commit 27a9440

Please sign in to comment.