SimulatedGREG / electron-vue

An Electron & Vue.js quick start boilerplate with vue-cli scaffolding, common Vue plugins, electron-packager/electron-builder, unit/e2e testing, vue-devtools, and webpack.
https://simulatedgreg.gitbooks.io/electron-vue/content/
MIT License
15.48k stars 1.55k forks source link

babili-webpack-plugin case some wrong code #903

Closed zhangshichun closed 4 years ago

zhangshichun commented 5 years ago

Found an issue or bug with electron-vue? Tell me all about it!

Questions regarding how to use electron or vue are likely to be closed as they are not direct issues with this boilerplate. Please seek solutions from official documentation or their respective communities.

Describe the issue / bug.

just see https://github.com/zhangshichun/electron-vue-build-bug

How can I reproduce this problem?

just run build https://github.com/zhangshichun/electron-vue-build-bug

Tell me about your development environment.

WHY?

It cased by the babili-webpack-plugin, this webpack-plugin may minify you JS code,and make it wrong from

    computed: {
        isCountEq2 () {
            return this.count + '' === '2'
        }
    }

to

computed:{isCountEq2:function(){return this.count+"2"}}

and this plugin's last commit, is 3 years ago……

HOW TO DO?

just use babel-minify-webpack-plugin!

XanderLuciano commented 4 years ago

PR merged