visionmedia / page.js

Micro client-side router inspired by the Express router
http://visionmedia.github.com/page.js
7.67k stars 687 forks source link

Webpack and pagejs does not execute at start #416

Closed nschurmann closed 6 years ago

nschurmann commented 7 years ago

I have this code:

import page from 'page'
page('*', function() {
  console.log('hello')
})

When i load my index.html file it won't print in the console, but only after i start navigating. What is happening?

aldebaran798 commented 7 years ago

You need call page() after routes declarations

matthewp commented 6 years ago

What @aldebaran798 said, thanks!