2020-12-31 03:06:16 +09:00
|
|
|
const path = require("path");
|
|
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
|
|
|
|
|
|
module.exports = ()=>{return {
|
2021-01-06 20:16:27 +09:00
|
|
|
entry: './src/client/app.tsx',
|
2020-12-31 03:06:16 +09:00
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, 'dist/js'),
|
|
|
|
filename: 'bundle.js'
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.(js|ts|tsx)$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
use: {
|
|
|
|
loader: 'babel-loader',
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.css$/,
|
|
|
|
use: [MiniCssExtractPlugin.loader,'css-loader']
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
plugins : [
|
|
|
|
new MiniCssExtractPlugin({
|
2021-01-11 23:37:29 +09:00
|
|
|
"filename":'../css/style.css'}),
|
2020-12-31 03:06:16 +09:00
|
|
|
],
|
2021-01-08 10:45:17 +09:00
|
|
|
devtool: 'source-map',
|
2020-12-31 03:06:16 +09:00
|
|
|
resolve: {
|
|
|
|
extensions: ['.js','.css','.ts','.tsx']
|
|
|
|
},
|
|
|
|
devServer: {
|
|
|
|
historyApiFallback: true,
|
|
|
|
port: 3001
|
|
|
|
}
|
|
|
|
};}
|