Webpack四,
我想把我的rsg-components放在node_modules里,而不是放在node_modules里。
因此,react-styleguidist将导入我的版本。
显然,resolve.alias并不优先于node_modules,是否有一种方法可以避免分叉react-stylguidist?
发布于 2018-05-13 18:54:19
您可以使用解决方案-模块。
只需在node_modules之前添加模块所在的目录即可。
从文件中:
如果要添加要搜索的目录,该目录优先于node_modules/:
modules: [path.resolve(__dirname, "src"), "node_modules"]https://stackoverflow.com/questions/50316950
复制相似问题