* Updates Dependencies
* Uses webpack to bundle runtime library into a single file * Inject the entire file into the Debugee * Register runtime helpers (hediet_dbgVis)
This commit is contained in:
43
data-extraction/webpack.config.ts
Normal file
43
data-extraction/webpack.config.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import * as webpack from "webpack";
|
||||
import path = require("path");
|
||||
import { CleanWebpackPlugin } from "clean-webpack-plugin";
|
||||
|
||||
const r = (file: string) => path.resolve(__dirname, file);
|
||||
|
||||
module.exports = {
|
||||
target: "node",
|
||||
entry: r("./src/index"),
|
||||
output: {
|
||||
path: r("./dist"),
|
||||
filename: "index.js",
|
||||
libraryTarget: "commonjs2",
|
||||
devtoolModuleFilenameTemplate: "../[resource-path]",
|
||||
},
|
||||
devtool: "source-map",
|
||||
resolve: {
|
||||
extensions: [".ts", ".js"],
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
exclude: /node_modules/,
|
||||
use: [
|
||||
{
|
||||
loader: "ts-loader",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
node: {
|
||||
__dirname: false,
|
||||
__filename: false,
|
||||
},
|
||||
plugins: [
|
||||
new CleanWebpackPlugin({
|
||||
protectWebpackAssets: true,
|
||||
cleanAfterEveryBuildPatterns: ["!**/*.d.ts", "!**/*.d.ts.map"],
|
||||
}),
|
||||
],
|
||||
} as webpack.Configuration;
|
||||
Reference in New Issue
Block a user