text: var path = require('path')
  var webpack = require('webpack')
  var config = require('../config')
  var utils = require('./utils')
  var projectRoot = path.resolve(__dirname, '../')
  console.log(path.resolve(__dirname, '../src/assets'))
  console.log(path.resolve(__dirname, '../src/components'))
  
  module.exports = {
    entry: {
      app: './admin/src/main.js'
    },
    output: {
      path: config.build.assetsRoot,
      publicPath: config.build.assetsPublicPath,
      filename: '[name].js'
    },
    resolve: {
      extensions: ['', '.js', '.vue'],
      fallback: [path.join(__dirname, '../node_modules')],
      alias: {
        'src': path.resolve(__dirname, '../src'),
        'assets': path.resolve(__dirname, '../src/assets'),
        'components': path.resolve(__dirname, '../src/components')
      }
    },
    resolveLoader: {
      fallback: [path.join(__dirname, '../node_modules')]
    },
    module: {
      loaders: [
        {
          test: /\.vue$/,
          loader: 'vue'
        },
        {
          test: /\.js$/,
          loader: 'babel',
          include: projectRoot,
          exclude: /node_modules/
        },
        {
          test: /\.json$/,
          loader: 'json'
        },
        {
          test: /\.html$/,
          loader: 'vue-html'
        },
        {
          test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
          loader: 'url',
          query: {
            limit: 10000,
            name: utils.assetsPath('img/[name].[hash:7].[ext]')
          }
        },
        {
          test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
          loader: 'url',
          query: {
            limit: 10000,
            name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
          }
        }
      ]
    },
    vue: {
      loaders: utils.cssLoaders()
    },
    node: {fs: 'empty'},
    plugins: [
      // [fetch polyfill](https://github.com/github/fetch)
      new webpack.ProvidePlugin({
        'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch'
      })
    ]
  }
  