// ===============================================================
// A PART OF BOOTSTRAP-VUE - Pooya Parsa <pooya@pi0.ir>
// https://github.com/pi0/bootstrap-vue
// ===============================================================

const Webpack = require('webpack');
const Path = require('path');


var config = module.exports = {
  plugins: [],
};

// Set context to root of project
config.context = Path.resolve(__dirname, '..');

// Resolver config
config.resolve = {
  extensions: ['', '.js', '.vue'],
  alias: {},
};

config.resolveLoader = {
  modules: config.resolve.modules,
};

// Client entry
config.entry = {
  bootstrapVue: Path.resolve(__dirname, '../components'),
};

// Basic output config
config.output = {
  path: Path.resolve(__dirname, '../dist'),
  filename: '[name].js'
};

// Config Module Loaders
config.module = {

  loaders: [
    // Vue
    {
      test: /\.vue$/,
      loader: 'vue',
    },
    // Vue HTML
    {
      test: /\.html$/,
      loader: 'vue-html'
    },
    // JS
    {
      test: /\.js$/,
      loader: 'babel',
      // important: exclude files in node_modules, otherwise it's going to be really slow!
      exclude: /node_modules|vendor/
    },
    // JSON
    {
      test: /\.json$/,
      loader: 'json'
    },
    // CSS
    {
      test: /\.css$/,
      loader: 'style!postcss!css',
    }
    ,
    // SCSS
    {
      test: /\.scss$/,
      loader: 'style!postcss!css!sass'
    },
    // Font
    {
      test: /\.(eot|svg|ttf|woff|woff2)$/,
      loader: 'file'
    },
    // Media
    {
      test: /\.(png|jpg|gif|svg)$/,
      loader: 'url',
      query: {
        // limit for base64 inlining in bytes
        limit: 10000,
        // custom naming format if file is larger than the threshold
        name: '[name].[ext]?[hash]'
      }
    },
    // Node
    {
      test: /\.node$/,
      loader: "node-loader"
    },
  ]
};

// Config Vue style loader
config.plugins.push(new Webpack.LoaderOptionsPlugin({
  options: {
    vue: {
      loaders: {
        'scss': 'vue-style!css!sass', // This will match all <style lang=scss> tags
      }
    }
  }
}));



if (process.env.NODE_ENV !== 'production') { // Development Config

  config.devtool = '#eval';

} else { // Production Config

  // Pass build environment inside bundle
  // This will Strip comments in Vue code & hort-circuits all Vue.js warning code
  config.plugins.push(new Webpack.DefinePlugin({
    'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development'),
  }));

  // The UglifyJsPlugin will no longer put loaders into minimize mode, and the debug option has been deprecated.
  config.plugins.push(new Webpack.LoaderOptionsPlugin({
    minimize: true,
    debug: false,
  }));

  // Minify with dead-code elimination
  config.plugins.push(new Webpack.optimize.UglifyJsPlugin({compress: {warnings: false}}));

}





@@ -266,17 +266,17 @@
 ;%0Aconst 
-P
+p
 ath = re
@@ -394,17 +394,17 @@
 ntext = 
-P
+p
 ath.reso
@@ -483,12 +483,8 @@
 s: %5B
-'', 
 '.js
@@ -505,16 +505,89 @@
 alias: %7B
+%0A    'vue': path.resolve(__dirname, '../node_modules/vue/dist/vue.js')%0A  
 %7D,%0A%7D;%0A%0Ac
@@ -698,17 +698,17 @@
 rapVue: 
-P
+p
 ath.reso
@@ -793,17 +793,17 @@
   path: 
-P
+p
 ath.reso
@@ -2919,12 +2919,8 @@
 %7D));%0A%0A%7D%0A
-%0A%0A%0A%0A

Update webpack.js