ionian/webpack.config.js

36 lines
884 B
JavaScript
Raw Normal View History

2020-12-31 03:06:16 +09:00
const path = require("path");
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = ()=>{return {
entry: './src/client/js/app.tsx',
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({
"filename":'../css/style.css'})
],
resolve: {
extensions: ['.js','.css','.ts','.tsx']
},
devServer: {
historyApiFallback: true,
port: 3001
}
};}