dyno-bot/Dyno-web-wip/react/webpack.config.js
2020-09-12 19:08:48 +01:00

41 lines
1.2 KiB
JavaScript
Executable File

let path = require('path');
let baseConfig = {
entry: {
serverListing: './serverListing/index.jsx',
serverPage: './serverListing/serverPage/index.jsx',
serverPageInvite: './serverListing/serverPage/invite/index.jsx',
dashboard: './dashboard/index.jsx',
status: './status/index.jsx',
auth: './auth/index.jsx'
},
output: {
path: path.join(__dirname, '../public/js/react'),
filename: '[name].js',
},
devtool: 'source-map',
module: {
loaders: [
{
test: /\.css$/,
loader: 'style-loader',
},
{
test: /\.css$/,
loader: 'css-loader',
query: {
modules: true,
localIdentName: '[name]__[local]___[hash:base64:5]',
},
},
{
test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader',
query: {
presets: ['react'],
plugins: ['transform-class-properties'],
},
},
],
},
};
module.exports = baseConfig;