UNPKG

flight-path

Version:

Express style router for Fastly Compute@Edge

35 lines (33 loc) 848 B
const path = require("path"); const webpack = require("webpack"); const NodePolyfillPlugin = require("node-polyfill-webpack-plugin") module.exports = { entry: "./src/index.js", mode: "production", optimization: { minimize: false, }, target: "webworker", output: { filename: "index.js", path: path.resolve(__dirname, "bin"), libraryTarget: "this", }, module: { // Asset modules are modules that allow the use asset files (fonts, icons, etc) // without additional configuration or dependencies. rules: [ // asset/source exports the source code of the asset. // Usage: e.g., import notFoundPage from "./page_404.html" { test: /\.(txt|html)/, type: "asset/source", }, ], }, plugins: [ new NodePolyfillPlugin({ excludeAliases: ["console"] }) ] };