Skip to content

Commit

Permalink
fix: Fix moduleScopePluginOpts optiosn issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Nov 24, 2019
1 parent d244694 commit ef85254
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/plugs/resolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module.exports = (conf: Configuration, opts: OptionConf) => {
// To fix this, we prevent you from importing files out of src/ -- if you'd like to,
// please link the files into your node_modules/ and let module-resolution kick in.
// Make sure your source files are compiled, as they will not be processed in any way.
new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson, ...opts.moduleScopePluginOpts]),
new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson, ...(opts.moduleScopePluginOpts || [])]),
],
};
return conf;
Expand Down
8 changes: 4 additions & 4 deletions src/utils/loadConf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ export interface LoaderDefaultResult {
}

export interface KKTRC {
/**
* 默认 loader 修改替换
*/
loaderDefault: (opts: LoaderDefaultResult, conf: Configuration, optionConf: OptionConf) => LoaderDefaultResult;
/**
* 修改 webpack 配置
*/
default?: (conf: Configuration, optionConf: OptionConf, webpack: any) => Configuration;
/**
* 默认 loader 修改替换
*/
loaderDefault: (opts: LoaderDefaultResult, conf: Configuration, optionConf: OptionConf) => LoaderDefaultResult;
/**
* 默认的 LoaderDefaultResult 之前添加 loader。
* 参考 [@kkt/loader-less](https://www.npmjs.com/package/@kkt/loader-less)
Expand Down

0 comments on commit ef85254

Please sign in to comment.