var path = require("path");

module.exports = {
  entry: "./main.js",
  output: {
    path: path.resolve(__dirname, "dist"),
    filename: "bundle.js",
    publicPath: "/dist"
  },
  module: {
    rules: [
      {
        test: /\.js$/,
      },
      {
        test: /\.scss$/,
        use: [
          {
            loader: "style-loader" // inserts css into the page as a <style> tag
          },
          {
            loader: "css-loader" // resolves all imports and url() in the CSS
          },
          {
            loader: "sass-loader" // compiles Sass to CSS
          }
        ]
      }
    ]
  }
};