SHARE
TWEET

Untitled

a guest Jan 18th, 2019 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top