webpack.config.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /**
  2. * Created by Jacky.Gao on 2018-04-23.
  3. * Base on Webpack4
  4. */
  5. const path=require('path');
  6. module.exports={
  7. mode:'development',
  8. entry: {
  9. frame:'./src/frame/index.jsx',
  10. variableEditor:'./src/variable/index.jsx',
  11. constantEditor:'./src/constant/index.jsx',
  12. parameterEditor:'./src/parameter/index.jsx',
  13. actionEditor:'./src/action/index.jsx',
  14. packageEditor:'./src/package/index.jsx',
  15. flowDesigner:'./src/flow/index.jsx',
  16. ruleSetEditor:'./src/editor/urule/index.jsx',
  17. decisionTableEditor:'./src/editor/decisiontable/index.jsx',
  18. scriptDecisionTableEditor:'./src/editor/scriptdecisiontable/index.jsx',
  19. decisionTreeEditor:'./src/editor/decisiontree/index.jsx',
  20. clientConfigEditor:'./src/client/index.jsx',
  21. ulEditor:'./src/editor/ul/index.jsx',
  22. scoreCardTable:'./src/scorecard/index.jsx',
  23. permissionConfigEditor:'./src/permission/index.jsx'
  24. },
  25. output:{
  26. path:path.resolve('../urule-console/src/main/resources/urule-asserts/js'),
  27. filename:'[name].bundle.js'
  28. },
  29. module:{
  30. rules:[
  31. {
  32. test: /\.(jsx|js)?$/,
  33. exclude: /node_modules/,
  34. loader: "babel-loader",
  35. options:{
  36. "presets": [
  37. "react","env"
  38. ]
  39. }
  40. },
  41. {
  42. test:/\.css$/,
  43. use: [{ loader: 'style-loader' }, { loader: 'css-loader' }]
  44. },
  45. {
  46. test: /\.(eot|woff|woff2|ttf|svg|png|jpg)$/,
  47. use: [
  48. {
  49. loader: 'url-loader',
  50. options: {
  51. limit: 10000000
  52. }
  53. }
  54. ]
  55. }
  56. ]
  57. }
  58. };