[Vuejs]-How to use webpack if I use script tag in the page to include Vue and Vue Router as global variable

0👍

Add multiple files in entry object in webpack.config.js

entryPoint = {
    app: ['path/to/vue.js', 'path/to/vue-router.js','./index.js'],
};

This will make sure that you have both vue and vue-router loaded when you have run index.js (entry point of project).

More on Webpack entry points.

Leave a comment