vuejs / vue

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

Home Page:http://v2.vuejs.org

Repository from Github https://github.comvuejs/vueRepository from Github https://github.comvuejs/vue

Add jsnext:main to package.json

nicolasparada opened this issue · comments

I noticed that in vue-router, you added jsnext:main pointing to the src folder.
Why you didn't do the same in all vuejs projects?

It is a non-standard property only used by some tools. As Node is starting to discuss official support for ES6 modules, we'll just wait for something more standarized.

This is fixed in 2.2, using the new pkg.module instead of jsnext:main.

@rpjohnst are there docs for pkg.module on the web? Is this an official npm field or a convention?

@ryanve The place I ran into it was here. Seems to be a convention shared among several bundlers.

@rpjohnst Cool thanks!