Open RichardJECooke opened 4 years ago
Aha! My alias path was incorrect. I'd like to change this bug to Please make parcel.js throw a warning or error if an alias path cannot be found when compiling.
I had to change my alias to "vue": "/../node_modules/vue/dist/vue.common.js".
and now it works.
🐛 bug report
Summary: parcel does not seem to be using the alias field in package.json to point to the correct version of vue, nor give any errors if the field is nonsense.
runtime command:
node ./node_modules/.bin/parcel src/index.html
package.json:
app.js:
Expected:
node_modules/vue/dist/vue.common.js
Actual:
vue.runtime.common.js
. I know this because the website tells meYou are using the runtime-only build of Vue where the template compiler is not available.
Tests:
package.json
setting for
aliasto
"vue" : "NONSENSE/wrong"` and the parcel bundler doesn't even complain - indicating it's not being used at all.🎛 Configuration (.babelrc, package.json, cli command)
package.json:
🔦 Context
If I try to set the vue path manually in my app.js file, like:
import Vue from '../../node_modules/vue/dist/vue.common'
then the website warns me it is using multiple instances of vue. So I'm trying to use this alias thing as described in your documentation page - https://parceljs.org/module_resolution.html. But it seems to be ignored entirely.🌍 Your Environment