You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+73-6Lines changed: 73 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,9 +85,7 @@ Plugin options can be set inside your `vue.config.js`:
85
85
module.exports= {
86
86
pluginOptions: {
87
87
browserExtension: {
88
-
options: {
89
-
// options...
90
-
}
88
+
// options...
91
89
}
92
90
}
93
91
}
@@ -99,15 +97,84 @@ module.exports = {
99
97
The browser extension components that will be managed by this plugin.
100
98
101
99
Valid components are:
100
+
- background
102
101
- popup
103
102
- options
104
-
-contentScript
103
+
-contentScripts
105
104
- standalone
105
+
- icons
106
106
107
107
```js
108
108
components: {
109
-
popup:true,
110
-
contentScript:true
109
+
background:true,
110
+
contentScripts:true,
111
+
icons:true
112
+
}
113
+
```
114
+
115
+
-**componentOptions**
116
+
- Type: `Object.<string, Object>`
117
+
118
+
See [Component options](#component-options).
119
+
120
+
-**manifestSync**
121
+
- Type: `Array<string>`
122
+
- Default: `['version']`
123
+
124
+
Array containing names of `manifest.json` keys that will be automatically synced with `package.json` on build.
125
+
126
+
Currently, the only supported keys are `version` and `description`.
127
+
128
+
### Component options
129
+
130
+
Some browser extension components have additional options which can be set as follows:
131
+
132
+
```js
133
+
// vue.config.js
134
+
module.exports= {
135
+
pluginOptions: {
136
+
browserExtension: {
137
+
componentOptions: {
138
+
// <name of component>: <options>
139
+
// e.g.
140
+
contentScripts: {
141
+
entries: {
142
+
'content1':'src/content-script1.js',
143
+
'content2':'src/content-script2.js'
144
+
}
145
+
}
146
+
}
147
+
}
148
+
}
149
+
}
150
+
```
151
+
152
+
#### background
153
+
154
+
-**entry**
155
+
- Type: `string|Array<string>`
156
+
157
+
Background script as webpack entry using the [single entry shorthand syntax](https://webpack.js.org/concepts/entry-points/#single-entry-shorthand-syntax).
0 commit comments