json-loader in webpack.config.js not working
问题 I'm trying to follow a react tutorial, My webpack.config.js file is as follows: var webpack = require("webpack"); var pth = require("path"); module.exports = { entry: "./src/index.js", output: { path: __dirname + "/dist", filename: "bundle.js" }, devServer: { inline: true, contentBase: './dist', port: 3000 }, module: { rules: [ { test: /\.js$/, exclude: /(node_modules)/, use: 'babel-loader' }, { test: /\.json$/, exclude: /(node_modules)/, use: 'json-loader' } ] } } While my Code files are as