webpack.js 435 B

123456789101112131415161718
  1. const path = require('path')
  2. module.exports = {
  3. entry: {
  4. comments: path.join(__dirname, 'src', 'comments.js'),
  5. 'comments-app': path.join(__dirname, 'src', 'comments-app.js'),
  6. 'comments-tab': path.join(__dirname, 'src', 'comments-tab.js'),
  7. },
  8. output: {
  9. path: path.resolve(__dirname, './js'),
  10. publicPath: '/js/',
  11. filename: '[name].js',
  12. jsonpFunction: 'webpackJsonpComments',
  13. },
  14. externals: {
  15. jquery: 'jQuery',
  16. },
  17. }