vue.jselectronbundleelectron-builderelectron-vue

electronBuilder can't bundle my resource at all


It's my vue.config.js:

module.exports = {
    pluginOptions: {
        electronBuilder: {
            preload: './src/preload.js',
                extraResources: ['resources/myengine'],
                "files": [
                "**/*"
                ],
                "extraFiles": [
                {
                    "from": "resources/myengine",
                    "to": "'./resources/app.asar.unpacked/myengine",
                },
                {
                    "from": "resources",
                    "to": "resources",
                    "filter": ["**/*"]
                }
        ]
    }
}

I try all solution to attach my resource but any result :( note: myengine is 5mb never added its size to my app.

BTW I read and try these:

Information:

So how could I solve my problem?


Solution

  • I found the problem, need to use builderOptions:

    module.exports = {
        pluginOptions: {
            electronBuilder: {
                builderOptions:{
                    extraResources: [
                    {from:'./src/resources/myengine',to:'./'}],
                }
    
            }
        }
    };
    

    One of them is enough :)