ObjToSchematic/webpack.common.js
2023-02-11 21:29:36 +00:00

38 lines
882 B
JavaScript

const path = require('path');
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
module.exports = {
entry: './src/client.ts',
plugins: [
new NodePolyfillPlugin(),
],
module: {
rules: [
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
},
{
test: /\.vs|fs$/,
use: 'raw-loader',
},
{
test: /\.png$/,
use: 'file-loader',
},
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules|main\.ts/,
},
],
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, './webpack'),
},
};