Skip to content
Permalink
Browse files
add browser/webworker support
  • Loading branch information
weinand committed Sep 9, 2020
1 parent c2dc113 commit 354c0e93c966a498360c660805d7f2b18d76b2a5
Showing 16 changed files with 2,824 additions and 367 deletions.
@@ -1,6 +1,8 @@
.DS_Store
node_modules/
out/
out
dist
node_modules
.vscode-test/
npm-debug.log
mock-debug.txt
*.vsix
.DS_Store
@@ -5,15 +5,29 @@
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
"--extensionDevelopmentPath=${workspaceFolder}",
"${workspaceFolder}/sampleworkspace"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "npm: watch"
},
{
"name": "Web Extension",
"type": "pwa-extensionHost",
"debugWebWorkerHost": true,
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"${workspaceFolder}/sampleworkspace"
],
"outFiles": [
"${workspaceFolder}/dist/web/**/*.js"
],
"preLaunchTask": "npm: watch-web"
},
{
"name": "Server",
"type": "node",
@@ -1,18 +1,40 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "npm",
"script": "compile-web",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$ts-webpack",
"$tslint-webpack"
]
},
{
"type": "npm",
"script": "watch-web",
"group": "build",
"isBackground": true,
"problemMatcher": [
"$ts-webpack-watch",
"$tslint-webpack-watch"
]
}
]
}
@@ -1,8 +1,9 @@

## 0.43.0
* Added context menu action "Show as Hex" to integer variables in Variables view
* Added new run option "namedPipeServer" for debug adapter in extension.ts
* Using new extension API for passing the "noDebug" option to "vscode.debug.startDebugging"
* Add context menu action "Show as Hex" to integer variables in Variables view
* Add new run option "namedPipeServer" for debug adapter in extension.ts
* Use new extension API for passing the "noDebug" option to "vscode.debug.startDebugging"
* Support to run Mock Debug in the browser/web worker

## 0.42.2
* Project hygiene: get rid of all warnings
@@ -0,0 +1,56 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

//@ts-check
'use strict';

//@ts-check
/** @typedef {import('webpack').Configuration} WebpackConfig **/

const path = require('path');

module.exports = /** @type WebpackConfig */ {
context: path.dirname(__dirname),
mode: 'none', // this leaves the source code as close as possible to the original (when packaging we set this to 'production')
target: 'webworker', // extensions run in a webworker context
entry: {
extension: './src/web/extension.ts',
},
resolve: {
mainFields: ['module', 'main'],
extensions: ['.ts', '.js'], // support ts-files and js-files
alias: {
}
},
module: {
rules: [{
test: /\.ts$/,
exclude: /node_modules/,
use: [{
// configure TypeScript loader:
// * enable sources maps for end-to-end source maps
loader: 'ts-loader',
options: {
compilerOptions: {
'sourceMap': true,
'declaration': false
}
}
}]
}]
},
externals: {
'vscode': 'commonjs vscode', // ignored because it doesn't exist
},
performance: {
hints: false
},
output: {
filename: 'extension.js',
path: path.join(__dirname, '../dist/web'),
libraryTarget: 'commonjs'
},
devtool: 'source-map'
};

0 comments on commit 354c0e9

Please sign in to comment.