mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-04 23:03:07 +00:00
36 lines
708 B
JavaScript
36 lines
708 B
JavaScript
import path from "path";
|
|
import { fileURLToPath } from "url";
|
|
import NodePolyfillPlugin from "node-polyfill-webpack-plugin";
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
|
|
export default {
|
|
mode: "production",
|
|
entry: "./web/index.js",
|
|
output: {
|
|
path: path.resolve(__dirname, "web"),
|
|
filename: "bundle.js",
|
|
clean: true
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.ts$/,
|
|
use: "babel-loader",
|
|
exclude: /node_modules/
|
|
}
|
|
]
|
|
},
|
|
resolve: {
|
|
extensions: [".ts", ".js"],
|
|
fallback: {
|
|
fs: false,
|
|
net: false,
|
|
tls: false
|
|
}
|
|
},
|
|
plugins: [new NodePolyfillPlugin()],
|
|
target: "web"
|
|
};
|