From ba8555e6e4d70fcb12520a1e0d6c34a77e1f81f3 Mon Sep 17 00:00:00 2001 From: Lu Jun Date: Sat, 18 Aug 2018 18:32:02 +0800 Subject: [PATCH] documentation for urlLoaderExcludes --- README.md | 12 ++++++++++++ README_zh-cn.md | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/README.md b/README.md index 65e67e9..9ebc1c6 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,7 @@ Index: * [ignoreMomentLocale](#ignoremomentlocale) * [disableDynamicImport](#disabledynamicimport) * [env](#env) +* [urlLoaderExcludes](#urlLoaderExcludes) ### entry @@ -329,6 +330,17 @@ e.g. Thus, extraBabelPlugins in development is `['transform-runtime', 'dva-hmr']`, and `['transform-runtime']` in production. +### urlLoaderExcludes + +Exclude files for `url-loader`. + +You should configure this option when you are using `webpack loader` to generate source code. +Otherwise the generated source code will be encoded as base64 data url. + +```js +"urlLoaderExcludes": [path.join(__dirname, 'src/parser.jison')], +``` + ## Environment Variables You can temporarily configure some parameters for environment variables, including: diff --git a/README_zh-cn.md b/README_zh-cn.md index a2d9cb6..4ee7ea6 100644 --- a/README_zh-cn.md +++ b/README_zh-cn.md @@ -108,6 +108,7 @@ export default { * [ignoreMomentLocale](#ignoremomentlocale) * [disableDynamicImport](#disabledynamicimport) * [env](#env) +* [urlLoaderExcludes](#urlLoaderExcludes) ### entry @@ -311,6 +312,17 @@ export default { 这样,开发环境下的 extraBabelPlugins 是?`["transform-runtime", "dva-hmr"]`,而生产环境下是?`["transform-runtime"]`。 +### urlLoaderExcludes + +配置不需要通过 `url-loader` 处理的文件。 + +当使用其他非默认 `webpack loader` 生成代码时需要配置这个选项。 +否则生成出来的代码会被 base64 编码。 + +```js +"urlLoaderExcludes": [path.join(__dirname, 'src/parser.jison')], +``` + ## 环境变量 可环境变量临时配置一些参数,包括: