Skip to content Skip to sidebar Skip to footer

Vuejs Router - Require Is Not Defined

I am trying to get started with this: https://github.com/vuejs/vue-router I have cloned the package, and followed the instructions to build: npm install npm run build But I am rec

Solution 1:

Have you done the following after you installed Browserify?

1) bundle all your .js files into one file (e.g. 'bundle.js') using command:

browserify example/example.js -o bundle.js

2) put 'bundle.js' script into your .html file:

<script src="bundle.js"></script>

Important: Do not put 'example.js' script into .html file as 'bundle.js' already includes everything from your 'example.js' file.


Post a Comment for "Vuejs Router - Require Is Not Defined"