Hi, I upgraded a plugin - made with React and Webpack, to manifest version 5 and it broke the plugin. Not sure what the problem is, I’m using version 23.4.1.
Here are the console messages:
Uncaught UxpRuntimeError: Refusing to load inline script tag as executable code. Code generation is disabled in plugins.
at Object.logInternalUncaughtException (uxp://uxp-internal/runtime_scripts_loader.js:2)
at e.exports._dispatchErrorEvent (uxp://uxp-internal/domjs_scripts.js:2)
at uxp://uxp-internal/domjs_scripts.js:2
at o._executeCallbacks (uxp://uxp-internal/domjs_scripts.js:2)
at o._executeIfReady (uxp://uxp-internal/domjs_scripts.js:2)
at Array.<anonymous> (uxp://uxp-internal/domjs_scripts.js:2)
at o._executeCallbacks (uxp://uxp-internal/domjs_scripts.js:2)
at o.done (uxp://uxp-internal/domjs_scripts.js:2)
at Object.s [as loadHtmlContent] (uxp://uxp-internal/domjs_scripts.js:2)
at Object._loadHtmlContent (uxp://uxp-internal/pluginmanager_scripts.js:2)
Uncaught EvalError: Code generation from strings disallowed for this context
at Object../src/index.jsx (VM11 index.js:3646)
at __webpack_require__ (VM11 index.js:20)
at VM11 index.js:84
at VM11 index.js:87
at e.exports.execScript (uxp://uxp-internal/domjs_scripts.js:2)
at l (uxp://uxp-internal/domjs_scripts.js:2)
at uxp://uxp-internal/domjs_scripts.js:2
at o._executeCallbacks (uxp://uxp-internal/domjs_scripts.js:2)
at o._executeIfReady (uxp://uxp-internal/domjs_scripts.js:2)
at Array.<anonymous> (uxp://uxp-internal/domjs_scripts.js:2)
How can I fix this please @kerrishotts
The manifest:
{
"name": "Master Keys Plugin",
"version": "1.0.0",
"main": "index.html",
"manifestVersion": 5,
"host": {
"app": "PS",
"minVersion": "23.3",
"data": {
"apiVersion": 2
}
},
"entrypoints": [
{
"type": "command",
"id": "showAbout",
"label": {
"default": "About React Demo"
}
},
{
"type": "panel",
"id": "prefs",
"label": {
"default": "Preferences"
},
"minimumSize": {"width": 530, "height": 400},
"maximumSize": {"width": 580, "height": 2000},
"preferredDockedSize": {"width": 230, "height": 300},
"preferredFloatingSize": {"width": 230, "height": 300},
"icons": [
{
"width": 23, "height": 23, "path": "icons/dark-panel.png", "scale": [ 1, 2 ],
"theme": [ "darkest", "dark", "medium" ], "species": [ "chrome" ]
}, {
"width": 23, "height": 23, "path": "icons/light-panel.png", "scale": [ 1, 2 ],
"theme": [ "lightest", "light" ], "species": [ "chrome" ]
}
]
},
{
"type": "panel",
"id": "keyboardLayout",
"label": {
"default": "Keyboard layout"
},
"minimumSize": {"width": 230, "height": 200},
"maximumSize": {"width": 2000, "height": 2000},
"preferredDockedSize": {"width": 230, "height": 300},
"preferredFloatingSize": {"width": 230, "height": 300},
"icons": [
{
"width": 23, "height": 23, "path": "icons/dark-panel.png", "scale": [ 1, 2 ],
"theme": [ "darkest", "dark", "medium" ], "species": [ "chrome" ]
}, {
"width": 23, "height": 23, "path": "icons/light-panel.png", "scale": [ 1, 2 ],
"theme": [ "lightest", "light" ], "species": [ "chrome" ]
}
]
}
],
"icons": [
{
"width": 48, "height": 48, "path": "icons/plugin.png", "scale": [ 1, 2 ],
"theme": [ "darkest", "dark", "medium", "lightest", "light", "all" ],
"species": [ "pluginList" ]
}
]
}