Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multi Page Application with webpack

How to use webpack with Multi Page Application , eg, my app is consist of several business modules, and each business module contains tens of page, each page has one entry. And new pages are created each month, and this lead to the final hundreds of pages. so my question is, how do webpack users handle this situation ?

Or webpack is just not suitable for MPA with hundreds of pages

like image 340
Jess Avatar asked Jul 04 '26 12:07

Jess


1 Answers

Sorry for posting 5 months later, but I think I have a Webpack based boilerplace that can handle multiple page application.

I am not sure about the scope of your application and about your understanding of multiple page application its dependency management.

My boilerplate can be found on GitHub (https://github.com/scriptex/webpack-mpa) and consists of:

  • Webpack for assets/css/js management
  • SCSS as primary CSS preprocessor
  • PostCSS as primary CSS postprocessor - handles adding of automatic vendor prefixes, assets loading from node_modules, importing of non-scss files, etc
  • Latest EcmaScript support thanks to Babel
  • PNG Sprites support
  • SVG Sprites support
  • Minification for production
  • Automatic browser reload during development thanks to BrowserSync
  • Predefined minimal php files structure
  • Ability to make it a Progressive Web App (via another module I created)
  • and more.

Once again, I am not sure about the scope of your project, but this boilerplate helps me with my multipage applications and I even use it in my WordPress themes development.

like image 119
Atanas Atanasov Avatar answered Jul 06 '26 03:07

Atanas Atanasov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!