File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,36 @@ module.exports = {
163
163
164
164
Directory where the zipped browser extension should get created.
165
165
166
+ - ** artifactFilename**
167
+
168
+ - Type: ` Function `
169
+ - Default: `` ({name, version, mode}) => `${name}-v${version}-${mode}.zip` ``
170
+
171
+ Optional function to generate a custom artifact filename. Useful for naming builds for different browsers.
172
+
173
+ The function takes a single object parameter containing:
174
+ - ` name ` - Name from ` package.json `
175
+ - ` version ` - Version from ` package.json `
176
+ - ` mode ` - Vue CLI mode such as 'production'
177
+
178
+ For example,
179
+
180
+ ``` js
181
+ // vue.config.js
182
+ module .exports = {
183
+ pluginOptions: {
184
+ browserExtension: {
185
+ artifactFilename : ({ name, version, mode }) => {
186
+ if (mode === ' production' ) {
187
+ return ` ${ name} -v${ version} -${ process .env .BROWSER } .zip` ;
188
+ }
189
+ return ` ${ name} -v${ version} -${ process .env .BROWSER } -${ mode} .zip` ;
190
+ },
191
+ },
192
+ },
193
+ };
194
+ ```
195
+
166
196
### Component options
167
197
168
198
Some browser extension components have additional options which can be set as follows:
You can’t perform that action at this time.
0 commit comments