webpack.dll.js 833 B

12345678910111213141516171819202122232425262728293031323334
  1. /**
  2. * @author: Yuki Takei <yuki@weseek.co.jp>
  3. */
  4. const path = require('path');
  5. const webpack = require('webpack');
  6. const helpers = require('./helpers');
  7. module.exports = {
  8. mode: 'development',
  9. entry: {
  10. dlls: [
  11. 'react', 'react-dom', 'react-bootstrap', 'react-bootstrap-typeahead', 'react-i18next',
  12. 'codemirror', 'react-codemirror2', 'react-dropzone',
  13. 'jquery-slimscroll', 'jquery-ui',
  14. 'markdown-it',
  15. 'diff2html', 'lodash', 'i18next',
  16. ]
  17. },
  18. output: {
  19. path: helpers.root('public/dll'),
  20. filename: 'dll.js'
  21. },
  22. resolve: {
  23. extensions: ['.js', '.json'],
  24. modules: [helpers.root('src'), helpers.root('node_modules')],
  25. },
  26. plugins: [
  27. new webpack.DllPlugin({
  28. path: path.join(helpers.root('public/dll'), 'manifest.json'),
  29. name: '[name]_[hash]'
  30. })
  31. ]
  32. };