Mercurial > code > home > repos > streamed-graph
view webpack.config.js @ 25:86270a59ae7b
even better configs. ts maps, devserver mode.
author | drewp@bigasterisk.com |
---|---|
date | Fri, 13 Dec 2019 23:52:23 -0800 |
parents | 09080dc809ed |
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 } };