Skip to content

Commit

Permalink
fixit
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherHX committed Oct 29, 2024
1 parent a9df3df commit 33235f9
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/runner-server-vscode/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules
native
*.js
*.js.map
!*.config.js
42 changes: 42 additions & 0 deletions src/runner-server-vscode/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
const path = require('path');

/** @typedef {import('webpack').Configuration} WebpackConfig **/
/** @type WebpackConfig */
const nodeExtensionConfig = {
mode: 'none', // this leaves the source code as close as possible to the original (when packaging we set this to 'production')
target: 'node', // extensions run in a webworker context
entry: {
main: './index.ts', // source of the web extension main file
},
output: {
filename: '[name]-node.js',
path: path.join(__dirname, './dist'),
libraryTarget: 'commonjs',
},
resolve: {
mainFields: ['main'], // look for `browser` entry point in imported node modules
extensions: ['.ts', '.js'], // support ts-files and js-files
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: [
{
loader: 'ts-loader'
}
]
}
]
},
externals: {
vscode: 'commonjs vscode' // ignored because it doesn't exist
},
performance: {
hints: false
},
devtool: "source-map"
};

module.exports = [ nodeExtensionConfig ];

0 comments on commit 33235f9

Please sign in to comment.