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:
29
webpack.config.js
Normal file
29
webpack.config.js
Normal 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')
|
||||
},
|
||||
};
|
Reference in New Issue
Block a user