santom

想请教一个关于 UglifyJsPlugin 的问题

  •  
  •   santom · Dec 20, 2018 · 3634 views
    This topic created in 2782 days ago, the information mentioned may be changed or developed.

    现有公司项目由 vue 迁移至 nuxt,移动端,在打包调试时发现 safari10 浏览器会出现

    cannot declare a let variable twice: 't'
    

    这样的报错,查阅了一些资料发现 vue-cli 中默认帮你配制好了 UglifyJsPlugin 插件的 safari10:true 而 nuxt 中并没有默认帮你配置。所以 我查看了 github 上 关于 nuxt 的 UglifyJsPlugin 配置 按照文档和他们的案例配置只好了我们的项目,然而 去 console 等其他功能都正常 safari10 的问题依然存在。 所以 现在懵逼了 ,希望有趟过坑的大佬指点下

    3 replies    2019-02-26 14:55:57 +08:00
    santom
        1
    santom  
    OP
       Dec 20, 2018
    所以 ,有没有大佬能指点下呀
    crystom
        2
    crystom  
       Feb 19, 2019
    // nuxt.config.js
    module.exports = {
    build: {
    uglify: {
    uglifyOptions: {
    mangle: { safari10: true }
    }
    }
    }
    }
    bazinga0401
        3
    bazinga0401  
       Feb 26, 2019
    这个问题解决了嘛?我参照这配置也没有生效
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1453 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 128ms · UTC 16:29 · PVG 00:29 · LAX 09:29 · JFK 12:29
    ♥ Do have faith in what you're doing.