fingerpan / vue-cli-plugin-dll

Vue CLI 3 plugin for Webpack DllPlugin/DllReferencePlugin
MIT License
76 stars 22 forks source link

output: filename 可以自定义 #36

Closed yandeqiang closed 5 years ago

yandeqiang commented 5 years ago

output: filename 可以自定义吗 如何做到自定义文件名,不要 hash 值

我看到代码中是写死的 https://github.com/fingerpan/vue-cli-plugin-dll/blob/0cf5d8daa7b3cc1df593b84fdc8c8dd570a002b7/src/dll.js#L32

fingerpan commented 5 years ago

@yandeqiang 目前文件名是 [name].[hash:8].dll.js;[name] 是入口entry的key名称。 例如:

module.exports = {
    pluginOptions: {
        dll: {
            entry:  {
                yourDllName:  ['vue', 'vue-route']
            }
        }
    }
 }

输出的文件名称就是 yourDllName.[hash:8].dll.js; 目前只支持这个方式,后面会暴露更多的参数给到output参数。