diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-06-21 00:50:15 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-06-21 00:50:15 +0200 |
| commit | 0b854ecccfe7832ba9a837605822a103fd9d8bc0 (patch) | |
| tree | d4a11b5677ff96618d29b114e43d25a334f66412 /webpack.config.js | |
| parent | fbbb3a348018081bb2a89439eb3275153105d2e0 (diff) | |
clearing out old code
Diffstat (limited to 'webpack.config.js')
| -rw-r--r-- | webpack.config.js | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..b08368c --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,39 @@ +var webpack = require('webpack') +var path = require('path') + +module.exports = { + entry: './client/index.jsx', + watch: true, + devtool: 'cheap-source-map', + output: { + filename: './public/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, + } +} |
