0%

Install Aria2

brew install aria2

Add alias

1
2
3
4
5
6
7
8
# ~/.zshrc or ~/.bash_profile
function down() {
echo "Downloading..";
aria2c -c -x 16 $1 && say "Complete";
}

# -c, --continue => Continue/Resume
# -x => Multiple Connections

Eg Usage

1
down https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf

Install Babel Plugin For Dynamic Import Syntax

yarn add -D babel-plugin-syntax-dynamic-import

Create .babelrc

1
2
3
{
"plugins": ["syntax-dynamic-import"]
}

Add Webpack Config in in webpack.mix.js

1
2
3
4
5
6
mix.webpackConfig({
output: {
chunkFilename: 'chunks/[name].[chunkhash].js',
publicPath: '/',
},
});

Replace Your Code

1
2
- Vue.component('example', require('./components/ExampleComponent.vue'))
+ Vue.component('example', () => import('./components/ExampleComponent.vue'))

Ref: