diff --git a/package.json b/package.json index e028d79..5a0244d 100644 --- a/package.json +++ b/package.json @@ -127,6 +127,7 @@ "happypack": "^5.0.0", "html-webpack-plugin": "^3.2.0", "http-proxy-middleware": "^0.19.0", + "json-loader": "^0.5.7", "lru-cache": "^4.1.3", "mini-css-extract-plugin": "^0.4.4", "minimist": "^1.2.0", diff --git a/src/config/webpack.config.config.ts b/src/config/webpack.config.config.ts index 1c07922..f3271c9 100644 --- a/src/config/webpack.config.config.ts +++ b/src/config/webpack.config.config.ts @@ -35,6 +35,11 @@ export function getConfigConfig({ rootDir }: { rootDir: string }): webpack.Confi externals: nodeExternals(), module: { rules: [ + { + test: /\.babelrc$/, + use: 'json-loader', + exclude: /node_modules/ + }, { test: /\.js$/, use: babelLoder, diff --git a/yarn.lock b/yarn.lock index 1807c58..a46fba6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4246,6 +4246,11 @@ jsesc@~0.5.0: resolved "http://registry.npm.taobao.org/jsesc/download/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= +json-loader@^0.5.7: + version "0.5.7" + resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" + integrity sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w== + json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "http://registry.npm.taobao.org/json-parse-better-errors/download/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9"