diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2017-12-28 15:07:01 +0200 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2017-12-28 15:07:01 +0200 |
| commit | 04a05206ff197fef47a985a24dfde7ae9c405520 (patch) | |
| tree | d347c13c024d2a8f140e8054a6fc54e9785fca4e /webpack.config.js | |
| parent | a1c33b51cef94bdec1484aefa3196f733fff123d (diff) | |
Remake a lot of stuff
Diffstat (limited to 'webpack.config.js')
| -rw-r--r-- | webpack.config.js | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..9907796 --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,47 @@ +const path = require('path') +const webpack = require('webpack') +const HtmlWebpackPlugin = require('html-webpack-plugin'); +const DotenvPlugin = require('webpack-dotenv-plugin'); + +module.exports = { + entry: './src/main.js', + output: { + path: path.resolve(__dirname, 'public'), + publicPath: '/', + filename: 'bundle.js' + }, + devtool: 'inline-source-map', + module: { + loaders: [ + { + test: /\.tag$/, + exclude: /node_modules/, + loader: 'riot-tag-loader', + query: { + type: 'es6', // transpile the riot tags using babel + hot: true, + style: 'sass' + } + }, + { + test: /\.js$/, + exclude: /node_modules/, + loader: 'babel-loader' + }, + { + test: /\.scss$/, + exclude: /node_modules/, + loader: ['style-loader', 'css-loader', 'sass-loader'] + } + ] + }, + plugins: [ + new HtmlWebpackPlugin({ + template: 'src/index.ejs' + }), + new DotenvPlugin({ + sample: './.env', + path: './.env' + }) + ] +} |
