antd-dayjs-webpack-plugin
antd-dayjs-webpack-plugin copied to clipboard
ypeError: getOptions is not a function
ERROR in ./node_modules/antd-dayjs-webpack-plugin/src/init-dayjs-webpack-plugin-entry.js Module build failed (from ./node_modules/antd-dayjs-webpack-plugin/src/init-loader.js): TypeError: getOptions is not a function
loader-utils 0.2.17 删除了 getOptions:parseQuery() will be replaced with getOptions() in the next major version of loader-utils. 你解决了吗
同问,这个问题要怎么解决呢
removed getOptions in favor loaderContext.getOptions ...
Breaking Changes in loader-utils v3
It is breaking change, you need webpack v5 to use this.getOptions, getOptions was removed, if you need webpack v4 support please use v2
https://github.com/webpack/loader-utils/issues/201#issuecomment-989709467
maybe you should add loader-utils as dependencies? so it works with pnpm
maybe you should add loader-utils as dependencies? so it works with pnpm
It seems that Webpack V5 has method this.getOptions() to get options, and if we want to get options we don't need to use this lib? This is my view.
好家伙,原来不是歪果仁。现在webpack5好像自带了方法,可以获取options,所以我们如果只想获取options的话,这个库应该是不必要的吧
@coder-chin with pnpm, only top and direct dependencies could be referenced, thus "require(‘loader-utils’)" will fail. pnpm下只能引用顶层依赖和直属依赖,require(‘loader-utils’)就会失败。
是否有解决办法