squiggle/packages/components/webpack.config.js
2022-03-22 13:33:28 +11:00

35 lines
612 B
JavaScript

const path = require('path');
module.exports = {
mode: 'production',
devtool: 'source-map',
entry: './src/index.ts',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.js', '.tsx', '.ts'],
},
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
library: {
name: 'squiggle_components',
type: 'umd',
},
},
devServer: {
static: {
directory: path.join(__dirname, 'public'),
},
compress: true,
port: 9000,
},
};