summaryrefslogtreecommitdiff
path: root/webpack.config.js
blob: 3c7c727e711becc9f1880a54a527a709de858a8b (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
var baseConfig = require('./webpackBaseConfig')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
var path = require('path')

module.exports = [Object.assign({}, baseConfig, {
  plugins: baseConfig.plugins.concat([
    new MiniCssExtractPlugin({
      filename: '[name].css',
      chunkFilename: '[id].css'
    })

  ]),
  devtool: 'source-map'
}), {
  devtool: 'source-map',
  entry: {
    htmlExport: path.join(__dirname, 'public/js/htmlExport.js')
  },
  module: {
    rules: [{
      test: /\.css$/,
      use: ['style-loader', 'css-loader']
    }, {
      test: /\.scss$/,
      use: ['style-loader', 'sass-loader']
    }, {
      test: /\.less$/,
      use: ['style-loader', 'less-loader']
    }]
  },
  output: {
    path: path.join(__dirname, 'public/build'),
    publicPath: '/build/',
    filename: '[name].js'
  },
  plugins: [
    new MiniCssExtractPlugin({
      filename: 'html.min.css'
    })
  ]
}]