From e05904f2e992ce3184952a8e569d9c28d85d68de Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 21 May 2018 02:49:46 +0200 Subject: basic css for form elements --- webpack.config.js | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 webpack.config.js (limited to 'webpack.config.js') diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..3185d2c --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,42 @@ +var webpack = require('webpack') +var path = require('path') +require('dotenv').config() + +module.exports = { + mode: process.env.NODE_ENV === 'production' ? 'production' : 'development', + entry: './app/client/index.jsx', + watch: true, + devtool: 'cheap-source-map', + output: { + path: __dirname + '/public', + filename: 'bundle.js', + }, + module: { + rules: [ + { + test: /\.jsx?$/, + exclude: /(node_modules|bower_components)/, + use: { + loader: 'babel-loader', + options: { + presets: ['env','es2015','stage-0'], + } + } + }, + { + test: /\.css$/, + use: [ 'style-loader', 'css-loader' ] + }, + ] + }, + resolve: { + alias: { + 'react': 'preact-compat', + 'react-dom': 'preact-compat', + } + }, + devServer: { + contentBase: path.join(__dirname, 'public'), + compress: true, + } +} -- cgit v1.2.3-70-g09d2