forked from actions/runner
-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9df3df
commit 33235f9
Showing
2 changed files
with
43 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ node_modules | |
native | ||
*.js | ||
*.js.map | ||
!*.config.js |
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,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 ]; |