text: var webpack = require("webpack"),
    path = require("path"),
    fileSystem = require("fs"),
    CleanWebpackPlugin = require("clean-webpack-plugin"),
    CopyWebpackPlugin = require("copy-webpack-plugin"),
    HtmlWebpackPlugin = require("html-webpack-plugin");
  
  var options = {
    entry: {
      popup: path.join(__dirname, "src", "popup.js"),
      background: path.join(__dirname, "src", "background.js"),
      example: path.join(__dirname, "src", "example.js"),
      contentscript: [path.join(__dirname, "src", "contentscript.js")]
    },
    output: {
      path: path.join(__dirname, "build"),
      filename: "[name].bundle.js"
    },
    module: {
      rules: [
        {
          test: /\.css$/,
          loader: "style-loader!css-loader",
          exclude: /node_modules/
        }
      ]
    },
    plugins: [
      new CleanWebpackPlugin(["build"]),
      new CopyWebpackPlugin([{ from: "src/manifest.json" }]),
      new HtmlWebpackPlugin({
        template: path.join(__dirname, "src", "popup.html"),
        filename: "popup.html",
        chunks: ["popup"]
      }),
      new HtmlWebpackPlugin({
        template: path.join(__dirname, "src", "background.html"),
        filename: "background.html",
        chunks: ["background"]
      }),
      new HtmlWebpackPlugin({
        template: path.join(__dirname, "src", "example.html"),
        filename: "example.html",
        chunks: ["example"]
      })
    ]
  };
  
  module.exports = options;
  