aboutsummaryrefslogtreecommitdiffstats
path: root/webpack.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js47
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'
+ })
+ ]
+}