Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
smmoosavi committed Nov 9, 2018
1 parent f394398 commit 7da0879
Show file tree
Hide file tree
Showing 4 changed files with 843 additions and 871 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"private": true,
"dependencies": {
"@babel/plugin-proposal-decorators": "^7.1.0",
"monkey-react-scripts": "0.1.2",
"monkey-react-scripts": "0.1.3",
"node-sass": "^4.9.3",
"postcss-inline-rtl": "^0.9.8",
"react": "^16.5.2",
"react-dom": "^16.5.2",
"react-scripts": "2.0.3",
"react-scripts": "2.1.1",
"webpack-visualizer-plugin": "^0.1.11"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion webpack-helpers/babelPatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const {findRule} = require('./utils');
module.exports.babelPatch = function babelPatch(webpackConfig, isDevelopment) {
// find babel rule
const babelRule = findRule(webpackConfig, (rule) => {
return ('' + rule.test === '' + /\.(js|jsx)$/)
return ('' + rule.test === '' + /\.(js|mjs|jsx|ts|tsx)$/)
});
const plugins = babelRule.options.plugins || [];
babelRule.options.plugins = [
Expand Down
4 changes: 2 additions & 2 deletions webpack-helpers/utils.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module.exports.findRule = function findRule(webpackConfig, callback) {
const rules = webpackConfig.module.rules[3].oneOf;
const rules = webpackConfig.module.rules[2].oneOf;
const index = rules.findIndex(callback);
if (index === -1) throw Error('Loader not found');
return rules[index]
};

module.exports.findRules = function findRule(webpackConfig, callback) {
const rules = webpackConfig.module.rules[3].oneOf;
const rules = webpackConfig.module.rules[2].oneOf;
return rules.filter(callback);
};

Expand Down
Loading

0 comments on commit 7da0879

Please sign in to comment.