"use strict";

const NodePolyfillPlugin = require("node-polyfill-webpack-plugin")

module.exports = {
    entry: './src/entry.ts',
    output: {
        filename: "entry.js",
    },
    mode: 'production',
    target: 'web',
    module: {
        rules: [
            {
                test: /\.ts$/,
                use: 'ts-loader',
                exclude: /node_modules/
            },
        ]
    },
    plugins: [
		new NodePolyfillPlugin()
	],
    resolve: {
        extensions: ['.ts', '.js'],
        modules: ["node_modules"],
        fallback: {
            'fs': false
        }
    }
};