1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-08 07:07:15 +02:00

Use webpack

This commit is contained in:
Phuoc Nguyen
2019-11-23 10:23:13 +07:00
parent 83e61eb7e3
commit ada4976227
9 changed files with 4029 additions and 290 deletions

29
webpack.config.js Normal file
View File

@@ -0,0 +1,29 @@
const path = require('path');
module.exports = {
entry: './client/index.jsx',
output: {
path: path.join(__dirname, 'public'),
filename: 'bundle.js',
},
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, 'public')
},
};