We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code splitting minimizes bundle size, so I wanted it for my project. This is how I did it:
in router/index.js:
// import Page from '../components/Page/Page.vue' const Page = () => import('../components/Page/Page.vue')
in webpack.mix.js:
mix.webpackConfig({ output: { publicPath: 'vuejs-wordpress-theme-starter/dist/', chunkFilename: 'scripts/[name].[chunkhash].js', }, });
and in the <head> of index.php:
<head>
<base href="<?php bloginfo( 'stylesheet_directory' ); ?>" />
Not sure if lazy-loading is 'best practice' for everyone, so putting it here instead of a pr. Perhaps its useful for someone or can be improved.
The text was updated successfully, but these errors were encountered:
Awesome, thanks for sharing @rugor
Sorry, something went wrong.
No branches or pull requests
Code splitting minimizes bundle size, so I wanted it for my project. This is how I did it:
in router/index.js:
in webpack.mix.js:
and in the
<head>
of index.php:<base href="<?php bloginfo( 'stylesheet_directory' ); ?>" />
Not sure if lazy-loading is 'best practice' for everyone, so putting it here instead of a pr. Perhaps its useful for someone or can be improved.
The text was updated successfully, but these errors were encountered: