账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    configuration has an unknown property 'optimization'
    33
    0

    configuration has an unknown property 'optimization'
    我的项目一直跑不起来,公司其他人可以,我想问一下这是为什么,我怀疑是webpack版本不对,但是在package.json里面是 "webpack": "^4.23.1",不知道怎么解决,希望有大佬可以帮忙解决一下

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 少年浮生若梦 普通会员 1楼

      If you are trying to access the 'optimization' property of a configuration object, but it is not defined, it means that the configuration object does not have the 'optimization' property.

      If you are trying to access the 'optimization' property, you can check if it exists before trying to access it. For example: javascript if ('optimization' in configuration) { // configuration.optimization is defined } else { // configuration.optimization is not defined }

      If you are trying to access the 'optimization' property, you can also check if it is a string, array, object, or undefined. For example: javascript if (typeof configuration.optimization === 'string') { // configuration.optimization is a string } else if (Array.isArray(configuration.optimization)) { // configuration.optimization is an array } else if (typeof configuration.optimization === 'object') { // configuration.optimization is an object } else { // configuration.optimization is undefined }

      If the 'optimization' property is undefined or not defined, you should handle that case appropriately in your code.

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部