Skip to content
Snippets Groups Projects
webpack.config.js 1.35 KiB
Newer Older
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
const SymlinkWebpackPlugin = require('symlink-webpack-plugin');
module.exports = {
    widget: './src/widget.js',
    browser: './src/browser.js'
  plugins: [
    new HtmlWebpackPlugin({
      title: 'Aug[m]entile',
      filename: 'augmentile-widget.html',
      hash: true,
      chunks: ['widget']
    }),
    new HtmlWebpackPlugin({
      title: 'Aug[m]entile',
      filename: 'augmentile-browser.html',
      hash: true,
      chunks: ['browser']
    new SymlinkWebpackPlugin({
      origin: 'augmentile-browser.html',
      symlink: 'index.html'
    }),
    new FaviconsWebpackPlugin({
      logo: './artwork/augmentile-icon.svg',
      favicons: {
        icons: {
          android: false,
          appleIcon: false,
          appleStartup: false,
          coast: false,
          favicons: true,
          firefox: false,
          windows: false,
          yandex: false
        }
      }
    })
    filename: 'augmentile-[name].bundle.js',
    path: path.resolve(__dirname, 'dist')
Nik | Klampfradler's avatar
Nik | Klampfradler committed
  },
  devServer: {
    contentBase: path.join(__dirname, 'dist')
  },
  module: {
    rules: [
      {
        test: /\.css$/i,
        use: ["style-loader", "css-loader"],
      }
    ]