31 lines
629 B
JavaScript
31 lines
629 B
JavaScript
|
const path = require("path");
|
||
|
const CopyPlugin = require("copy-webpack-plugin");
|
||
|
|
||
|
module.exports = {
|
||
|
entry: './src/client/main.ts',
|
||
|
plugins: [
|
||
|
new CopyPlugin({
|
||
|
patterns: [{
|
||
|
from: "index.html",
|
||
|
to: "."
|
||
|
}]
|
||
|
})
|
||
|
],
|
||
|
module: {
|
||
|
rules: [
|
||
|
{
|
||
|
test: /\.tsx?$/,
|
||
|
use: 'ts-loader',
|
||
|
exclude: [/node_modules/, /server/],
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
resolve: {
|
||
|
alias: {three: path.resolve('./node_modules/three/')},
|
||
|
extensions: ['.tsx', '.ts', '.js'],
|
||
|
},
|
||
|
output: {
|
||
|
filename: 'bundle.js',
|
||
|
path: path.resolve(__dirname, './dist/client/'),
|
||
|
}
|
||
|
};
|