view webpack.config.js @ 27:e0f5da648199

fix getter, startup expanded state, better display before 1st data (but that one might not work)
author drewp@bigasterisk.com
date Fri, 13 Dec 2019 23:53:56 -0800
parents 86270a59ae7b
children 45ed53428e74 db0e9cbf52e5
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'),
        publicPath: '/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
    },
    devServer: {
        port: 8082,
        publicPath: '/build/',
        contentBase: __dirname
    }
};