forked from KreativJos/csharpextensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix/loading speed (webpack) (KreativJos#51)
* [Add] Extension packaging via webpack * [Fix] Removed a lot of files from the package (.vscodeignore)
- Loading branch information
1 parent
54d32dc
commit 5e0cc52
Showing
7 changed files
with
785 additions
and
35 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
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,23 +1,50 @@ | ||
{ | ||
"version": "2.0.0", | ||
"presentation": { | ||
"echo": true, | ||
"reveal": "always", | ||
"focus": false, | ||
"panel": "shared", | ||
"showReuseMessage": true, | ||
"clear": false | ||
}, | ||
"tasks": [ | ||
{ | ||
"type": "npm", | ||
"script": "watch", | ||
"problemMatcher": "$tsc-watch", | ||
"isBackground": true, | ||
"presentation": { | ||
"echo": true, | ||
"reveal": "always", | ||
"focus": false, | ||
"panel": "shared", | ||
"showReuseMessage": true, | ||
"clear": false | ||
}, | ||
"label": "build", | ||
"command": "yarn", | ||
"type": "shell", | ||
"args": [ | ||
"run", | ||
"compile" | ||
], | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
} | ||
}, | ||
{ | ||
"label": "buildDev", | ||
"command": "yarn", | ||
"type": "shell", | ||
"args": [ | ||
"run", | ||
"compileDev" | ||
], | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
}, | ||
{ | ||
"label": "test", | ||
"command": "echo", | ||
"group": { | ||
"kind": "test", | ||
"isDefault": true | ||
}, | ||
"args": [ | ||
"Run tests in VS Code by launching the debugger with the 'Launch Tests' configuration." | ||
] | ||
}, | ||
] | ||
} |
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
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 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
//@ts-check | ||
|
||
const path = require('path'); | ||
/**@type {import('webpack').Configuration}*/ | ||
const config = { | ||
target: 'node', // vscode extensions run in a Node.js-context π -> https://webpack.js.org/configuration/node/ | ||
entry: './src/extension.ts', // the entry point of this extension, π -> https://webpack.js.org/configuration/entry-context/ | ||
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 | ||
extensions: ['.ts', '.js'] | ||
}, | ||
node: { | ||
__dirname: false //preserve the default node.js behavior for __dirname | ||
}, | ||
module: { | ||
rules: [{ | ||
test: /\.ts$/, | ||
exclude: /node_modules/, | ||
use: [{ | ||
loader: 'ts-loader', | ||
}] | ||
}] | ||
}, | ||
} | ||
|
||
module.exports = config; |
Oops, something went wrong.