zoukankan      html  css  js  c++  java
  • nuxt 报Though the “loose“ option was set to “false“ in your @babel/preset-env config, it will not(解决)

    nuxt 执行报错 :

     WARN  Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-methods since the "loose" mode option was set to "true" for @babel/
    plugin-proposal-class-properties.
    The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can s
    ilence this warning by explicitly adding
            ["@babel/plugin-proposal-private-methods", { "loose": true }]
    to the "plugins" section of your Babel config.


     WARN  Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-methods since the "loose" mode option was set to "true" for @babel/
    plugin-proposal-class-properties.
    The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can s
    ilence this warning by explicitly adding
            ["@babel/plugin-proposal-private-methods", { "loose": true }]
    to the "plugins" section of your Babel config.
     

    遇到这情况 在 build加上该插件就行了,注意位置.别放错地方了

    nuxt.config.js 里

      // Build Configuration: https://go.nuxtjs.dev/config-build
      build: {
        babel:{
           plugins:[
             ["@babel/plugin-proposal-private-methods", { "loose": true }]
           ]
        }
      }

    即可

  • 相关阅读:
    第一篇unity
    C#相关知识小结
    必须知道的八大种排序算法【java实现】
    JAVA八大排序算法
    二进制、八进制、十进制、十六进制之间的转换
    八大排序算法
    JSONArray数据转换成java List
    使用json-lib的JSONObject.toBean( )时碰到的日期属性转换的问题
    一探前端开发中的JS调试技巧
    SpringMVC注解说明
  • 原文地址:https://www.cnblogs.com/lllomh/p/14991862.html
Copyright © 2011-2022 走看看