webpack.js 431 B

12345678910111213141516171819
  1. const path = require('path')
  2. module.exports = {
  3. entry: {
  4. dashboard: path.join(__dirname, 'src', 'dashboard'),
  5. 'user-status-menu': path.join(__dirname, 'src', 'main-user-status-menu'),
  6. },
  7. output: {
  8. path: path.resolve(__dirname, './js'),
  9. publicPath: '/js/',
  10. filename: '[name].js?v=[chunkhash]',
  11. jsonpFunction: 'webpackJsonpUserStatus',
  12. },
  13. optimization: {
  14. splitChunks: {
  15. automaticNameDelimiter: '-',
  16. },
  17. },
  18. }