-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ NPM workspaces and Migrate to Vite for HMR in Webview Package (#71)
PR changes: - Replace Webpack with Vite for webview-ui. In development mode, the extension is able to consume the webview running on a local vite dev server which allows for HMR and a rapid development experience. - Adds npm workspaces implementation for dependency sharing (typescript) & better handling of build / dev scripts for development / production. Lifts all eslint & prettier configuration to project root. - Creates a new `shared` package that holds shared code between webview-ui and extension. - Can now run npm install && npm run dev from the project root to start both development servers (webpack for extension & vite for ui) - Vite enables HMR for webview development. Also removes need for complex plugin configuration - only plugin needed now is the [vite react plugin ](https://github.com/konveyor/editor-extensions/pull/71/files#diff-223561f5d3cf9a2528977c12fbd3b80c758ac2bf700fa6d85ff7071236178e30R2) - Adds a new debugger pre launch task to start dev servers. This allows us to start all development servers & open the debugger with f5. Fixes #77 TODO: - Replace webpack copy plugin with something more robust - Address vscode extension state management - Improve webview messaging --------- Signed-off-by: Ian Bolton <ibolton@redhat.com>
- Loading branch information
1 parent
cbe0d32
commit 6527244
Showing
67 changed files
with
3,819 additions
and
5,118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
vscode/node_modules | ||
vscode/dist | ||
vscode/build | ||
node_modules/ | ||
out/ | ||
build/ | ||
dist/ | ||
|
||
# TypeScript build info | ||
vscode/tsconfig.tsbuildinfo | ||
vscode/tsbuildinfo | ||
vscode/.metadata | ||
vscode/org.eclipse* | ||
.aider* | ||
|
||
# Miscellaneous | ||
vscode/tsbuildinfo | ||
.vscode/*.aider* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v22.9.0 |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Run Extension", | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"args": ["--extensionDevelopmentPath=${workspaceFolder}/vscode"], | ||
"outFiles": ["${workspaceFolder}/vscode/out/**/*.js"], | ||
"env": { | ||
"VSCODE_DEBUG_MODE": "true" | ||
}, | ||
"preLaunchTask": "npm: dev" | ||
}, | ||
{ | ||
"name": "Extension Tests", | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"args": [ | ||
"--extensionDevelopmentPath=${workspaceFolder}/vscode", | ||
"--extensionTestsPath=${workspaceFolder}/vscode/out/test/suite/index" | ||
], | ||
"outFiles": ["${workspaceFolder}/vscode/out/test/**/*.js"], | ||
"preLaunchTask": "npm: test-watch - vscode" | ||
}, | ||
{ | ||
"name": "Run Dev Script", | ||
"type": "node", | ||
"request": "launch", | ||
"cwd": "${workspaceFolder}", | ||
"runtimeExecutable": "npm", | ||
"runtimeArgs": ["run", "dev"], | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"env": { | ||
"VSCODE_DEBUG_MODE": "true" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "npm: dev", | ||
"type": "npm", | ||
"script": "dev", | ||
"isBackground": true, | ||
"problemMatcher": { | ||
"owner": "custom", | ||
"fileLocation": [ | ||
"relative", | ||
"${workspaceFolder}" | ||
], | ||
"pattern": [ | ||
{ | ||
"regexp": ".*VITE v\\d+\\.\\d+\\.\\d+.*ready in.*", | ||
"message": 0, | ||
"file": 0, | ||
"location": 0 | ||
|
||
}, | ||
{ | ||
"regexp": ".*webpack.*compiled successfully.*", | ||
"message": 0, | ||
"file": 0, | ||
} | ||
], | ||
"background": { | ||
"activeOnStart": true, | ||
"beginsPattern": ".*Executing task: npm run dev.*", | ||
"endsPattern": ".*(VITE|webpack).*compiled successfully.*" | ||
} | ||
} | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.