summaryrefslogtreecommitdiff
path: root/webpack.htmlexport.js
blob: 2aa2bc4fcdb4e7b41792b2b22abb59eb059e72a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const path = require('path')

module.exports = {
  name: 'save-as-html',
  entry: {
    htmlExport: path.join(__dirname, 'public/js/htmlExport.js')
  },
  module: {
    rules: [{
      test: /\.css$/,
      use: [MiniCssExtractPlugin.loader, 'css-loader']
    }]
  },
  output: {
    path: path.join(__dirname, 'public/build'),
    publicPath: 'build/',
    filename: '[name].js'
  },
  plugins: [
    new MiniCssExtractPlugin({
      filename: 'html.min.css'
    })
  ]
}