thelarkinn / code-splitting-examples Goto Github PK
View Code? Open in Web Editor NEWVueJs and webpack Code Splitting Examples
VueJs and webpack Code Splitting Examples
Complete newbie to the vuejs world and I've been trying to get code splitting to work in the router but have been unsuccessful :(
After cloning this repo and running npm run dev
and visiting http://localhost:8080/#/ExampleTwo
in Chrome the network tab reported the following:
As you can see all the chunks are loaded upfront (including Home) which doesn't seem correct, is it? If you then click the "Home" link, there is no activity in the network tab, I was expecting it to load the code for the home page, is something broken or am I doing something wrong?
The other thing I noticed is that the chunked filenames don't appear to math the webpack config of chunkFilename: '[name].[id].lazy.js'
, so instead of home.0.lazy.js
it is 0.0.lazy.js
. Is this wrong, has something changed in the vue / webpack space that has broken this demo?
Any help would be super awesome as I've been completely unsuccessful in getting code splitting working.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.