phantom-marmiton/webpack.config.js
2022-01-08 00:07:09 +01:00

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
},
};