@@ -306,6 +306,46 @@ following valid forms:
306
306
* An arbitrary URL to a Python package: ` "https://.../package.whl" `
307
307
* A file copied onto the browser based file system: ` "emfs://.../package.whl" `
308
308
309
+ ### Plugins
310
+
311
+ The ` plugins ` option allows user to either augment, or exclude, the list of
312
+ plugins imported out of the box from * core* during bootstrap.
313
+
314
+ While augmenting requires some knowledge about * core* internals, excluding
315
+ some plugin might be desired to avoid such plugin behavior and, in edge cases,
316
+ reduce the amount of network requests to bootstrap * PyScript* .
317
+
318
+ It is possible to check the [ list of plugins] ( https://github.com/pyscript/pyscript/blob/main/core/src/plugins.js )
319
+ we offer by default, where each * key* is used as plugin name and could be also
320
+ disabled using the ` !pugin-name ` convention, here an example:
321
+
322
+ ``` TOML title="Specify plugins in TOML"
323
+ plugins = [" custom_plugin" , " !error" ]
324
+ ```
325
+
326
+ ``` JSON title="Specify plugins in JSON"
327
+ {
328
+ "plugins" : [" custom_plugin" , " !error" ]
329
+ }
330
+ ```
331
+
332
+ !!! info
333
+
334
+ The `"!error"` syntax is a way to turn off a plugin built into PyScript
335
+ that is enabled by default.
336
+
337
+ It is possible to turn off other plugins too using the very same
338
+ convention.
339
+
340
+ !!! warning
341
+
342
+ Please note `plugins` are currently a *core* only feature. If you need any
343
+ extra functionality out of the box *files* or *js_modules* are the current
344
+ way to provide more features without needing to file a *PR* in *core*.
345
+
346
+ This means that the current `plugins` proposal is meant to disable our own
347
+ plugins but it has no usage to add 3rd party plugins right now.
348
+
309
349
### JavaScript modules
310
350
311
351
It's easy to import and use JavaScript modules in your Python code. This
0 commit comments