view webpack.config.js @ 24:09080dc809ed

webpack config might finally work
author drewp@bigasterisk.com
date Fri, 13 Dec 2019 23:05:12 -0800
parents 9ec3cbc8791a
children 86270a59ae7b
line wrap: on
line source

const path = require("path");
const webpack = require('webpack');
const PnpWebpackPlugin = require('pnp-webpack-plugin');

module.exports = {
    entry: ['./src/streamed-graph.ts'],
    output: {
        filename: 'streamed-graph.bundle.js',
        path: path.resolve(__dirname, 'build')
    },
    module: {
        rules: [
            {
                test: /\.ts$/,
                loader: require.resolve('ts-loader'),
                options: PnpWebpackPlugin.tsLoaderOptions({
                    // ... regular options go there ...
                })
            },
            { test: /\.css$/i, use: ['file-loader'] },
        ]
    },
    devtool: 'source-map',
    resolve: {
        extensions: [".ts", ".js"],
        plugins: [
            PnpWebpackPlugin,
        ],
    },
    resolveLoader: {
        plugins: [
            PnpWebpackPlugin.moduleLoader(module),
        ],
    },
    watchOptions: {
        ignored: /node_modules/,
        poll: 200
    }
};