Skip to content

Commit

Permalink
refactor(build-config): get rid of obsolete json loader
Browse files Browse the repository at this point in the history
  • Loading branch information
dmbch committed Feb 19, 2018
1 parent 504e51d commit 93ddbbf
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 27 deletions.
8 changes: 1 addition & 7 deletions packages/build-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
"name": "hops-build-config",
"version": "10.0.2",
"description": "Hops build configuration leveraging Webpack and Babel",
"keywords": [
"hops",
"webpack",
"babel",
"postcss"
],
"keywords": ["hops", "webpack", "babel", "postcss"],
"license": "MIT",
"main": "index.js",
"files": [
Expand Down Expand Up @@ -41,7 +36,6 @@
"file-loader": "^1.1.6",
"find-up": "^2.1.0",
"hops-config": "10.0.2",
"json-loader": "^0.5.7",
"loader-utils": "^1.1.0",
"lodash.template": "^4.4.0",
"mkdirp": "^0.5.1",
Expand Down
25 changes: 14 additions & 11 deletions packages/build-config/sections/module-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@

module.exports = function getModuleRules(target) {
return [
require('./module-rules/babel'),
require('./module-rules/graphql'),
require('./module-rules/postcss'),
require('./module-rules/json'),
require('./module-rules/file'),
require('./module-rules/url'),
require('./module-rules/tpl'),
require('./module-rules/config'),
].map(function(config) {
return config[target] || config.default || config;
});
{
oneOf: [
require('./module-rules/babel'),
require('./module-rules/graphql'),
require('./module-rules/postcss'),
require('./module-rules/config'),
require('./module-rules/tpl'),
require('./module-rules/url'),
require('./module-rules/file'),
].map(function(config) {
return config[target] || config.default || config;
}),
},
];
};
8 changes: 0 additions & 8 deletions packages/build-config/sections/module-rules/json.js

This file was deleted.

2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4675,7 +4675,7 @@ jsesc@~0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"

json-loader@^0.5.4, json-loader@^0.5.7:
json-loader@^0.5.4:
version "0.5.7"
resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d"

Expand Down

0 comments on commit 93ddbbf

Please sign in to comment.