text: const webpack = require('webpack')
  const path = require('path')
  const WriteFilePlugin = require('write-file-webpack-plugin')
  const HtmlWebpackPlugin = require('html-webpack-plugin')
  const VueLoaderPlugin = require('vue-loader/lib/plugin')
  
  module.exports = {
      entry: {
          app: './source/root.js',
      },
      plugins: [
          new WriteFilePlugin(),
          new HtmlWebpackPlugin({
              title: 'Devel Admin',
              template: 'index.html'
          }),
          new webpack.ProvidePlugin({
              $: 'jquery',
              jQuery: 'jquery',
              'window.jQuery': 'jquery',
              Tether: 'tether',
              'window.Tether': 'tether',
              Popper: ['popper.js', 'default'],
              Alert: 'exports-loader?Alert!bootstrap/js/dist/alert',
              Button: 'exports-loader?Button!bootstrap/js/dist/button',
              Carousel: 'exports-loader?Carousel!bootstrap/js/dist/carousel',
              Collapse: 'exports-loader?Collapse!bootstrap/js/dist/collapse',
              Dropdown: 'exports-loader?Dropdown!bootstrap/js/dist/dropdown',
              Modal: 'exports-loader?Modal!bootstrap/js/dist/modal',
              Popover: 'exports-loader?Popover!bootstrap/js/dist/popover',
              Scrollspy: 'exports-loader?Scrollspy!bootstrap/js/dist/scrollspy',
              Tab: 'exports-loader?Tab!bootstrap/js/dist/tab',
              Tooltip: 'exports-loader?Tooltip!bootstrap/js/dist/tooltip',
              Util: 'exports-loader?Util!bootstrap/js/dist/util',
          }),
          new VueLoaderPlugin()
      ],
      module: {
          rules: [
              {
                  test: /\.js$/,
                  use: [
                      {
                          loader: 'babel-loader',
                          options: {
                              "presets": [
                                  ["env"]
                              ],
                              "plugins": ["transform-es2015-destructuring", "transform-object-rest-spread", "transform-runtime"]
                          }
                      }
                  ],
                  exclude: /node_modules/,
              },
              {
                  test: /\.vue$/,
                  loader: 'vue-loader',
                  options: {
                      loaders: {
                          // Since sass-loader (weirdly) has SCSS as its default parse mode, we map
                          // the "scss" and "sass" values for the lang attribute to the right configs here.
                          // other preprocessors should work out of the box, no loader config like this nessessary.
                          'scss': 'vue-style-loader!css-loader!sass-loader',
                          'sass': 'vue-style-loader!css-loader!sass-loader?indentedSyntax',
                          'js': 'babel-loader?presets[]=env'
                      }
                  }
              },
              {
                  test: /\.(png|jpg|gif)$/, loader: 'file-loader?name=./img/[name].[ext]'
              },
              {
                  test: /.(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
                  use: [{
                      loader: 'file-loader',
                      options: {
                          name: '[name].[ext]',
                          outputPath: 'fonts/',    // where the fonts will go
                          publicPath: 'fonts/'       // override the default path
                      }
                  }]
              }
          ]
      },
      resolve: {
          alias: {
              'vue$': 'vue/dist/vue.common.js'
          }
      }
  }
  