var path = require('path');
var webpack = require("webpack");
var BomPlugin = require('webpack-utf8-bom');

module.exports = {
  entry: './index.js',
  output: {
    filename: 'bundle.js',
    path: path.resolve('./dist')
  },
  resolve: {
        alias: {
           // 'jquery': "jquery/src/jquery",
			'jquery-ui': "jqueryui/", 
			modules: path.join(__dirname, "node_modules"),
        }
   },
    loaders: [
		{
			test: /[\/\\]node_modules[\/\\]some-module[\/\\]index\.js$/,
			loader: "imports-loader?this=>window"
		}
    ],
   node: {
	  fs: "empty",
	  "child_process": "empty",
	  "node-packager": "empty",
	  "download.jqueryui.com/lib/jquery-ui" : "empty"
	},
  plugins: [
    new BomPlugin(true),
    new webpack.ProvidePlugin({
	   $: "jquery",
	   jquery: "jquery"
    })
  ],
  externals: {
	//	jquery: "jquery",
		jqueryui: "jquery-ui",
		filesaver: "filesaver",
		blob: "blob"
}};