1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-10-23 10:46:13 +02:00
Files
csslayout/webpack.config.js
Phuoc Nguyen 6360fb595d Fix the build
2019-11-23 17:53:54 +07:00

36 lines
1006 B
JavaScript

const path = require('path');
module.exports = {
entry: './client/index.jsx',
output: {
path: path.join(__dirname, 'build'),
filename: 'bundle.js',
// It's very important
// All the chunk generated by webpack then will be loaded such as
// <script charset="utf-8" src="/[chunk-name].bundle.js"></script>
// The script is accessible from any page that exported by a 3rd party such as react-snap
publicPath: '/',
},
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
],
},
resolve: {
extensions: ['.js', '.jsx'],
},
devtool: 'cheap-module-eavl-source-map',
devServer: {
contentBase: path.join(__dirname, 'build'),
historyApiFallback: true,
},
};