diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-05-21 02:49:46 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-05-21 02:49:46 +0200 |
| commit | e05904f2e992ce3184952a8e569d9c28d85d68de (patch) | |
| tree | 50c4af17d282384be4cc34a0adfc6dc823fc3261 /webpack.config.js | |
| parent | 135fde231646f8f8838cdf16ddb0bc3ad2e94d3a (diff) | |
basic css for form elements
Diffstat (limited to 'webpack.config.js')
| -rw-r--r-- | webpack.config.js | 42 |
1 files changed, 42 insertions, 0 deletions
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, + } +} |
