Fix font-awesome issue

This commit is contained in:
Ivan Diaz 2019-08-10 14:36:36 +02:00
parent b7b4161cd9
commit 46db3bf27e
6 changed files with 10 additions and 9 deletions

View File

@ -28,6 +28,7 @@
"@babel/preset-react": "^7.0.0",
"@babel/register": "^7.5.5",
"axios-mock-adapter": "^1.15.0",
"babel-loader": "^8.0.6",
"babel-plugin-add-module-exports": "^1.0.2",
"browser-sync": "^2.7.13",
"chai": "^3.5.0",
@ -45,6 +46,7 @@
"jsdom": "^8.4.1",
"mocha": "^6.2.0",
"morgan": "^1.6.1",
"node-sass": "^4.12.0",
"nodemon": "^1.19.1",
"path": "^0.12.7",
"proxyquire": "^1.7.4",
@ -67,8 +69,6 @@
"dependencies": {
"axios": "^0.18.0",
"classnames": "^2.2.5",
"font-awesome": "^4.7.0",
"font-awesome-sass-loader": "^2.0.1",
"history": "^3.0.0",
"html-to-text": "^4.0.0",
"keycode": "^2.1.4",

View File

@ -111,7 +111,7 @@ class App extends React.Component {
history.push('/admin');
}
if(proccess.env.NODE_ENV === 'production' && _.includes(props.location.pathname, '/components-demo')) {
if(process.env.NODE_ENV === 'production' && _.includes(props.location.pathname, '/components-demo')) {
history.push('/');
}
}

View File

@ -9,9 +9,8 @@
<title>OpenSupports</title>
<link rel="icon" type="image/x-icon" href="/images/icon.png">
</head>
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<body>
<div id="app"></div>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=String.prototype.startsWith,Array.from,Array.prototype.fill,Array.prototype.keys,Array.prototype.find,Array.prototype.findIndex,Array.prototype.includes,String.prototype.repeat,Number.isInteger,Promise&flags=gated"></script>

View File

@ -7,7 +7,6 @@ import ConfigActions from 'actions/config-actions';
import routes from 'app/Routes';
import store from 'app/store';
import 'font-awesome-sass-loader';
import './main.scss';
Array.prototype.swap = function (x,y) {

View File

@ -12,8 +12,8 @@
<title>OpenSupports</title>
<link rel="stylesheet" href="<?=$url ?>/css/main.css">
<link rel="icon" type="image/x-icon" href="<?=$url ?>/images/icon.png">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
</head>
<body>
<div id="app"></div>
@ -28,6 +28,7 @@
<?php if (preg_match('~MSIE|Internet Explorer~i', $_SERVER['HTTP_USER_AGENT']) || (strpos($_SERVER['HTTP_USER_AGENT'], 'Trident/7.0; rv:11.0') !== false)): ?>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=String.prototype.startsWith,Array.from,Array.prototype.fill,Array.prototype.keys,Array.prototype.find,Array.prototype.findIndex,Array.prototype.includes,String.prototype.repeat,Number.isInteger,Promise&flags=gated"></script>
<?php endif; ?>
<script src="<?=$url ?>/js/main.js"></script>
<script src="<?=$url ?>/vendor.js"></script>
<script src="<?=$url ?>/bundle.js"></script>
</body>
</html>

View File

@ -95,7 +95,9 @@ const config = env => {
'./src/.htaccess',
{from: './src/assets/images', to: 'images'},
]),
new BundleAnalyzerPlugin(),
new BundleAnalyzerPlugin({
analyzerMode: process.env.NODE_ENV !== 'production' ? 'server' : 'disabled'
}),
],
optimization: {
splitChunks: {