Skip to content

Commit

Permalink
plugins: Migrate plugins to vite
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksandr Dubenko <[email protected]>
  • Loading branch information
sniok committed Jun 28, 2024
1 parent ec9cebe commit 3127480
Show file tree
Hide file tree
Showing 20 changed files with 15,768 additions and 56,109 deletions.
6 changes: 3 additions & 3 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"@types/react": "^17.0.27",
"@types/react-dom": "^17.0.9",
"@types/react-redux": "^7.1.19",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.1",
"@types/react-window": "^1.8.5",
"@types/semver": "^7.3.8",
Expand Down Expand Up @@ -69,7 +70,6 @@
"monaco-editor": "^0.25.2",
"notistack": "^2.0.8",
"openapi-types": "^9.3.0",
"patch-package": "^6.4.7",
"postcss": "^8.4.5",
"postcss-flexbugs-fixes": "^5.0.2",
"process": "^0.11.10",
Expand Down Expand Up @@ -150,10 +150,10 @@
"../app/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [
"prettier --config package.json --write"
],
"../plugins/headlamp-plugin/{bin,lib,template}/**/*.{ts,tsx}": [
"../plugins/headlamp-plugin/{bin,lib}/**/*.{ts,tsx}": [
"eslint -c package.json --fix"
],
"../plugins/headlamp-plugin/{bin,lib,template}/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [
"../plugins/headlamp-plugin/{bin,lib}/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [
"prettier --config package.json --write"
],
"../plugins/examples/**/*.{ts,tsx}": [
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/plugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ export async function fetchAndExecutePlugins(
// Execute plugins inside a context (not in global/window)
(function (str: string) {
try {
const result = eval(str);
const result = eval(str + `\n//# sourceURL=main.js`);
return result;
} catch (e) {
// We just continue if there is an error.
Expand Down
Loading

0 comments on commit 3127480

Please sign in to comment.