Guest User

Untitled

a guest
Jan 18th, 2019
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. ./home.html
  2. ./settings.html
  3. ./contact.html
  4.  
  5. ./nav.js <-- common - used in all html files
  6. ./home.js <-- used only in home.html, below follow the same rule
  7. ./settings.js
  8. ./contact.js
  9.  
  10. ./home.js
  11. import $ from "jquery";
  12. (...)
  13.  
  14. entry: {
  15. home: "./resources/js/sections/home.js",
  16. settings: "./resources/js/sections/settings.js",
  17. (...)
  18. }
  19. (...)
  20. output: {
  21. filename: '[name].js',
  22. }
  23.  
  24. import nav from ./nav.js
  25. nav();
  26.  
  27. entry: {
  28. (...)
  29. nav: "./resources/js/sections/nav.js"
  30. }
  31.  
  32. npm install html-loader html-webpack-plugin --save-dev
Add Comment
Please, Sign In to add comment