美文网首页webpack
错误:WARNING in configuration The

错误:WARNING in configuration The

作者: 饥人谷_Leonardo | 来源:发表于2018-09-14 17:01 被阅读699次

    1、错误描述

    WARNING in configuration
    The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
    You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/

    2、错误原因

    没有设置webpack的模式,是生产还是开发(production or development)

    3、解决办法

    执行命令:webpack --mode=production 或者 webpack --mode=development

    $ ./node_modules/.bin/webpack --mode=development
    
    Hash: 310a9d712d610fa38fef
    Version: webpack 4.17.2
    Time: 743ms
    Built at: 2018-09-05 16:06:05
      Asset      Size  Chunks             Chunk Names
    main.js  3.81 KiB    main  [emitted]  main
    Entrypoint main = main.js
    [./src/index.js] 37 bytes {main} [built]
    

    相关文章

      网友评论

        本文标题:错误:WARNING in configuration The

        本文链接:https://www.haomeiwen.com/subject/giwawftx.html