refactor: use webpack to compile and package

This commit is contained in:
Levi Yan
2024-07-02 12:31:42 +08:00
parent fd9fe52529
commit f044c4770a
3 changed files with 9 additions and 15 deletions

View File

@@ -15,7 +15,7 @@ externals.push('vscode');
module.exports = {
mode: 'production',
entry: __dirname + '/src/main.js',
entry: __dirname + '/src/main.ts',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'extension.js',
@@ -27,14 +27,14 @@ module.exports = {
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
test: /\.ts$/,
loader: 'ts-loader',
exclude: /node_modules/
}
]
},
resolve: {
modules: [path.resolve('./node_modules'), path.resolve('./src')],
extensions: ['.js']
extensions: ['.ts', '.js']
}
};