33 lines
749 B
JavaScript
33 lines
749 B
JavaScript
const path = require("path");
|
|
|
|
module.exports = {
|
|
target: "node", // this will tell webpack to compile for a Node.js environment
|
|
entry: {
|
|
app: ["./src/marmiton/index.ts"],
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.ts$/,
|
|
use: "ts-loader",
|
|
exclude: /node_modules/,
|
|
},
|
|
],
|
|
},
|
|
resolve: {
|
|
extensions: [".ts"],
|
|
},
|
|
output: {
|
|
path: path.resolve(__dirname, "./dist"),
|
|
filename: "bundle.js",
|
|
},
|
|
externals: {
|
|
phantombuster: "commonjs2 phantombuster",
|
|
puppeteer: "commonjs2 puppeteer",
|
|
"is-my-json-valid": "commonjs2 is-my-json-valid",
|
|
},
|
|
optimization: {
|
|
minimize: false, // we disable the minimization plugin to keep the phantombuster package comment directives
|
|
},
|
|
};
|