use react、 react-router and webpack-cdn-plugin。
mainPage not have axios,pageB use axios to fetch sth.
import('axios').then()
While mainPage load CDN axios.min.js is useless.
now : dist/index has CDN of axios, both /mainPage and /pageB use it.
Expect: /mainPage not have CDN of axios, /pageB load bundle of axios like 1.[hash].js or CDN axios, and then fetch sth. so , mainPage can have a better TTI.
demo here, need your response, Please.
cdn-plugin-bug.zip
use react、 react-router and webpack-cdn-plugin。 mainPage not have axios,pageB use axios to fetch sth.
While mainPage load CDN axios.min.js is useless.
now : dist/index has CDN of axios, both /mainPage and /pageB use it. Expect: /mainPage not have CDN of axios, /pageB load bundle of axios like 1.[hash].js or CDN axios, and then fetch sth. so , mainPage can have a better TTI. demo here, need your response, Please. cdn-plugin-bug.zip