Config
+ Add ignores for generated files + Add webpack
This commit is contained in:
2364
client/package-lock.json
generated
2364
client/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -18,10 +18,14 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/vscode": "1.43.0",
|
||||
"antlr4ts-cli": "^0.5.0-alpha.4",
|
||||
"vscode-test": "^1.3.0"
|
||||
"vscode-test": "^1.3.0",
|
||||
"webpack": "^5.33.2",
|
||||
"webpack-cli": "^4.6.0"
|
||||
},
|
||||
"scripts": {
|
||||
"regen": "antlr4ts bf.g4 -no-listener -visitor -o src/generated/"
|
||||
"regen": "antlr4ts bf.g4 -no-listener -visitor -o src/generated/",
|
||||
"webpack": "webpack --mode development",
|
||||
"webpack-prod":"webpack --mode production",
|
||||
"webpack-dev": "webpack --mode development --watch"
|
||||
}
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@ let client: LanguageClient;
|
||||
export function activate(context: ExtensionContext) {
|
||||
// The server is implemented in node
|
||||
let serverModule = context.asAbsolutePath(
|
||||
path.join('server', 'out', 'server.js')
|
||||
path.join('server', 'dist', 'server.js')
|
||||
);
|
||||
// The debug options for the server
|
||||
// --inspect=6009: runs the server in Node's Inspector mode so VS Code can attach to the server for debugging
|
||||
|
51
client/webpack.config.js
Normal file
51
client/webpack.config.js
Normal file
@@ -0,0 +1,51 @@
|
||||
//@ts-check
|
||||
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
// const {} = require('webpack');
|
||||
/**@type {import('webpack').Configuration}*/
|
||||
const config = {
|
||||
target: 'node', // vscode extensions run in a Node.js-context 📖 -> https://webpack.js.org/configuration/node/
|
||||
|
||||
entry: {
|
||||
extension:path.join(__dirname,'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: '[name].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'],
|
||||
plugins:[]
|
||||
},
|
||||
stats:'minimal',
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
exclude: /node_modules/,
|
||||
use: [
|
||||
{
|
||||
loader: 'ts-loader',
|
||||
options:{
|
||||
configFile : 'tsconfig.json'
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
};
|
||||
module.exports = config;
|
Reference in New Issue
Block a user