Skip to content

Commit

Permalink
feat: 添加 babelrc文件解析支持
Browse files Browse the repository at this point in the history
  • Loading branch information
imsunhao committed Oct 22, 2019
1 parent 4427d32 commit 84fb110
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions src/config/webpack.config.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 84fb110

Please sign in to comment.