webpack.conf.js 557 B

1234567891011121314151617181920212223
  1. var webpack = require('webpack'),
  2. path = require('path'),
  3. exec = require('child_process').execSync,
  4. pwd = exec('pwd').toString();
  5. module.exports = {
  6. entry: {
  7. app: './app/main.js'
  8. },
  9. externals: {
  10. jquery: 'jQuery',
  11. 'grav-form': 'GravForm'
  12. },
  13. module: {
  14. preLoaders: [
  15. { test: /\.json$/, loader: 'json' },
  16. { test: /\.js$/, loader: 'eslint', exclude: /node_modules/ }
  17. ],
  18. loaders: [
  19. { test: /\.js$/, loader: 'babel', exclude: /node_modules/, query: { presets: ['es2015'] } }
  20. ]
  21. }
  22. };