Skip to content

damujiangr/preact-router-dynamic-optimize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

preact-router-dynamic-optimize

dynamic routing and common chunk for preact

search damujiangr: for details

related: damujiangr/react-router-dynamic-optimize

Usage

  1. command:
npm start       // start app
npm run build   // build and analysis
  1. preact + preact-compat

    Fast 3kB alternative to React with the same modern API.

    preact getting started

  2. preact-router

    Connect your Preact components up to that address bar.

    Note: This is not a preact-compatible version of React Router.

    preact-router >>

  3. preact-async-route

    Lazy loading (code splitting) with preact-router can be implemented easily using the AsyncRoute module.

    preact-async-route >>

  4. history

    Manage session history with JavaScript.

    history >>

  5. bundle analysis, plugins: webpack-bundle-analyzer

// damujiangr: require
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;

// damujiangr: bundle analyer
new BundleAnalyzerPlugin(),

About

dynamic routing and common chunk for preact

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published