forked from mirror/ObjToSchematic
38 lines
882 B
JavaScript
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'),
|
|
},
|
|
};
|