diff options
author | Fabio Berger <me@fabioberger.com> | 2017-05-26 19:24:25 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-05-26 19:24:25 +0800 |
commit | 4465313df3689ccf356b516693a77925ea2f57ea (patch) | |
tree | 86a0a63dba249162a949a8cb82e91b6c14a68242 | |
parent | e1e50bba3d08a96d4cb5a9314c255e5d5c19d51a (diff) | |
download | dexon-sol-tools-4465313df3689ccf356b516693a77925ea2f57ea.tar dexon-sol-tools-4465313df3689ccf356b516693a77925ea2f57ea.tar.gz dexon-sol-tools-4465313df3689ccf356b516693a77925ea2f57ea.tar.bz2 dexon-sol-tools-4465313df3689ccf356b516693a77925ea2f57ea.tar.lz dexon-sol-tools-4465313df3689ccf356b516693a77925ea2f57ea.tar.xz dexon-sol-tools-4465313df3689ccf356b516693a77925ea2f57ea.tar.zst dexon-sol-tools-4465313df3689ccf356b516693a77925ea2f57ea.zip |
Include JSON file loader in webpack
-rw-r--r-- | package.json | 3 | ||||
-rw-r--r-- | webpack.config.js | 26 |
2 files changed, 20 insertions, 9 deletions
diff --git a/package.json b/package.json index 36a79eba0..a55f7bfa2 100644 --- a/package.json +++ b/package.json @@ -34,14 +34,15 @@ "devDependencies": { "@types/bignumber.js": "^4.0.2", "@types/chai": "^3.5.2", + "@types/lodash": "^4.14.64", "@types/mocha": "^2.2.41", "@types/node": "^7.0.22", - "@types/lodash": "^4.14.64", "awesome-typescript-loader": "^3.1.3", "bignumber.js": "^4.0.2", "chai": "^3.5.0", "chai-bignumber": "^2.0.0", "copyfiles": "^1.2.0", + "json-loader": "^0.5.4", "mocha": "^3.4.1", "npm-run-all": "^4.0.2", "nyc": "^10.3.2", diff --git a/webpack.config.js b/webpack.config.js index 04822d79d..67af51f7a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -17,7 +17,7 @@ module.exports = { umdNamedDefine: true, }, resolve: { - extensions: ['.ts', '.js'], + extensions: ['.ts', '.js', '.json'], }, devtool: 'source-map', plugins: [ @@ -28,13 +28,23 @@ module.exports = { }), ], module: { - loaders: [{ - test: /\.ts$/, - loader: 'awesome-typescript-loader', - exclude: /node_modules/, - query: { - declaration: false, + rules: [ + { + test: /\.ts$/, + use: [ + { + loader: 'awesome-typescript-loader', + query: { + declaration: false, + }, + }, + ], + exclude: /node_modules/, }, - }], + { + test: /\.json$/, + loader: 'json-loader', + }, + ], }, }; |