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
+20-21Lines changed: 20 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -179,27 +179,6 @@ module.exports = {
179
179
180
180
Array containing names of mode in which zipping up will trigger after build.
181
181
182
-
-**api**
183
-
184
-
- Type: `'chrome'|'browser'`
185
-
- Default: `'browser'`
186
-
187
-
Browser extension API to use.
188
-
189
-
-**usePolyfill**
190
-
191
-
- Type: `boolean`
192
-
- Default: `true`
193
-
194
-
Whether to add [webextension-polyfill](https://github.com/mozilla/webextension-polyfill) to polyfill WebExtension APIs in chrome.
195
-
196
-
-**autoImportPolyfill**
197
-
198
-
- Type: `boolean`
199
-
- Default: `true`
200
-
201
-
Whether to auto import `webextension-polyfill` using Webpack's [ProvidePlugin](https://webpack.js.org/plugins/provide-plugin/).
202
-
203
182
-**artifactsDir**
204
183
205
184
- Type: `string`
@@ -270,6 +249,26 @@ There is some basic usage of it in the manifest, as well as in some of the boile
270
249
Since this is largely an out of the box solution provided by the browsers, it is heavily encouraged to utilize it.
271
250
If you do not want to translate your app, simply delete the `public/_locales` directory, and no longer use the `browser.i18n` methods.
272
251
252
+
## Browser Polyfills
253
+
254
+
This plugin by default adds in the official [mozilla webextension polyfill](https://github.com/mozilla/webextension-polyfill) to the build.
255
+
The opinion of this plugin is that developers should be building cross platform, and should have reasonable tooling to do so.
256
+
By emphasizing cross platform first, your application will be adhering to the community standards, be ready for distribution to other extension stores, and avoid developing against browser APIs that may have no equivalent.
257
+
The polyfill is a no-op on firefox, and only takes up 20.5kb unminified.
258
+
259
+
If you still feel strongly to not include the polyfill, then this is what you need to add to your webpack chain to do so.
0 commit comments