text: const path = require('path')
  const webpack = require('webpack')
  const VueLoaderPlugin = require('vue-loader/lib/plugin')
  
  const config = {
    module: {
      rules: [
        {
          test: /.vue$/,
          loader: 'vue-loader'
        },
        {
          test: /.js$/,
          loader: 'babel-loader'
        },
        {
          test: /\.css$/,
          use: [
            'vue-style-loader',
            'css-loader',
            {
              loader: 'postcss-loader',
              options: {
                sourceMap: true
              }
            }
          ]
        },
        {
          test: /\.(scss|sass)$/,
          use: [
            'vue-style-loader',
            'css-loader',
            {
              loader: 'postcss-loader',
              options: {
                sourceMap: true
              }
            },
            'sass-loader'
          ]
        }
      ]
    },
    plugins: [
      new webpack.DefinePlugin({
        "process.env": {
          NODE_ENV: process.env.NODE_ENV === 'development' ? '"development"' : '"production"'
        }
      }),
      new VueLoaderPlugin()
    ],
    node: {
      setImmediate: false,
      dgram: 'empty',
      fs: 'empty',
      net: 'empty',
      tls: 'empty',
      child_process: 'empty'
    },
    resolve: {
      extensions: ['.js'],
      alias: {
        '@': path.join(__dirname, '../src')
      }
    }
  }
  
  module.exports = config
  