From 06f84e61cdf0d3ac5d02b470e6a4cf386add1453 Mon Sep 17 00:00:00 2001 From: Jeremy Booker Date: Tue, 4 Oct 2016 10:59:32 -0400 Subject: [PATCH] Cleanup unused variables in webpack configs. Rename search.jsx entry point to SearchInterface.jsx --- webpack.config.dev.js | 9 +++++++-- webpack.config.prod.js | 11 +++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/webpack.config.dev.js b/webpack.config.dev.js index 1a3160cc..5d3e4683 100644 --- a/webpack.config.dev.js +++ b/webpack.config.dev.js @@ -2,20 +2,23 @@ var webpack = require('webpack'); var path = require('path'); var Promise = require('es6-promise').polyfill(); -var APP_DIR = path.resolve(__dirname, ''); +//var APP_DIR = path.resolve(__dirname, ''); var JS_DIR = path.resolve(__dirname, 'javascript'); module.exports = { devtool: 'eval', entry: { createInterface: JS_DIR + '/createInterface/CreateInternshipInterface.jsx', - searchInterface: JS_DIR + '/searchInterface/search.jsx', + searchInterface: JS_DIR + '/searchInterface/SearchInterface.jsx', editAdmin: JS_DIR + '/editAdmin/editAdmin.jsx' }, output: { path: path.join(JS_DIR, "dist"), filename: "[name].dev.js" }, + externals: { + "jquery": "$" + }, module: { loaders: [ { @@ -36,4 +39,6 @@ module.exports = { configFile: path.join(__dirname, '.eslintrc.js'), useEslintrc: false }, + plugins: [ + ] } diff --git a/webpack.config.prod.js b/webpack.config.prod.js index 26810a08..6ad85609 100644 --- a/webpack.config.prod.js +++ b/webpack.config.prod.js @@ -3,7 +3,7 @@ var WebpackStripLoader = require('strip-loader'); var path = require('path'); var Promise = require('es6-promise').polyfill(); -var APP_DIR = path.resolve(__dirname, ''); +//var APP_DIR = path.resolve(__dirname, ''); var JS_DIR = path.resolve(__dirname, 'javascript'); module.exports = { @@ -12,7 +12,7 @@ module.exports = { devtool: 'source-map', entry: { createInterface: JS_DIR + '/createInterface/CreateInternshipInterface.jsx', - searchInterface: JS_DIR + '/searchInterface/search.jsx', + searchInterface: JS_DIR + '/searchInterface/SearchInterface.jsx', editAdmin: JS_DIR + '/editAdmin/editAdmin.jsx' }, output: { @@ -20,6 +20,9 @@ module.exports = { filename: "[name]-[hash].min.js", chunkFilename: '[name].[chunkhash:8].chunk.js' }, + externals: { + "jquery": "$" + }, module: { loaders: [{ enforce: "pre", @@ -27,8 +30,8 @@ module.exports = { loader: "eslint", include: JS_DIR }, { - test: /\.jsx?/, - include: APP_DIR, + test: /\.(js|jsx)$/, + include: JS_DIR, loader: 'babel' }, { test: [/\.js$/, /\.es6$/, /\.jsx$/],