-
Notifications
You must be signed in to change notification settings - Fork 4
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
255705c
commit d4c05c3
Showing
5 changed files
with
934 additions
and
62 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
*.jar | ||
*.vsix | ||
build | ||
out | ||
dist | ||
lerna-debug.log | ||
lib | ||
node_modules | ||
|
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,15 +1,19 @@ | ||
.vscode/** | ||
.vscode-test/** | ||
out/test/** | ||
|
||
*.vsix | ||
node_modules | ||
out/** | ||
src/** | ||
.gitignore | ||
.yarnrc | ||
vsc-extension-quickstart.md | ||
**/tsconfig.json | ||
webpack.config.js | ||
**/.eslintrc.json | ||
**/*.map | ||
**/webpack.config.js | ||
**/tsconfig.json | ||
**/.eslintrc.json | ||
**/*.map | ||
**/*.ts | ||
|
||
*.code-workspace | ||
*.vsix | ||
*.code-workspace |
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
//@ts-check | ||
|
||
'use strict'; | ||
|
||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
|
||
/**@type {import('webpack').Configuration}*/ | ||
const config = { | ||
target: "node", // vscode extensions run in a Node.js-context 📖 -> https://webpack.js.org/configuration/node/ | ||
mode: "none", // this leaves the source code as close as possible to the original (when packaging we set this to 'production') | ||
|
||
entry: './src/extension.ts', // the entry point of this extension, 📖 -> https://webpack.js.org/configuration/entry-context/ | ||
output: { | ||
// the bundle is stored in the 'dist' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/ | ||
path: path.resolve(__dirname, 'dist'), | ||
filename: 'extension.js', | ||
libraryTarget: 'commonjs2', | ||
devtoolModuleFilenameTemplate: '../[resource-path]' | ||
}, | ||
devtool: 'source-map', | ||
externals: { | ||
vscode: 'commonjs vscode' // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/ | ||
}, | ||
resolve: { | ||
// support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader | ||
mainFields: ['browser', 'module', 'main'], // look for `browser` entry point in imported node modules | ||
extensions: ['.ts', '.js'], | ||
alias: { | ||
// provides alternate implementation for node module and source files | ||
}, | ||
fallback: { | ||
// Webpack 5 no longer polyfills Node.js core modules automatically. | ||
// see https://webpack.js.org/configuration/resolve/#resolvefallback | ||
// for the list of Node.js core module polyfills. | ||
} | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.ts$/, | ||
exclude: /node_modules/, | ||
use: [ | ||
{ | ||
loader: 'ts-loader' | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}; | ||
module.exports = config; |
Oops, something went wrong.