BoltDoggy / parcel-plugin-vue

⚠️ parcel-bundler/parcel @1.7.0 support Vue Now. This plugin will be not recommended.
https://github.com/parcel-bundler/parcel
209 stars 15 forks source link

.vue file is undefined #13

Closed RichardJECooke closed 6 years ago

RichardJECooke commented 6 years ago

<!- description ->

Please help. Parcel builds without error but my .vue file is being imported as undefined when trying to use your plugin.

<!- repo url ->

https://bitbucket.org/RichardCooke/t/src/189e6301660040607c1fde89ec54a9f87c648c65/src_simple/?at=master

<!- environment ->

Software Version(s)
parcel-plugin-vue latest
Parcel latest
Vue latest
Node latest
npm/Yarn latest
Operating System Ubuntu latest

package.json

{
  "name": "dailypractice",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git+ssh://git@bitbucket.org/rjeapps/dailypractice.git"
  },
  "author": "Richard JE Cooke",
  "license": "UNLICENSED",
  "homepage": "https://bitbucket.org/rjeapps/dailypractice#readme",
  "private": true,
  "devDependencies": {
    "babel-plugin-transform-runtime": "^6.23.0",
    "babel-preset-env": "^1.6.1",
    "css-loader": "^0.28.7",
    "eslint": "^4.14.0",
    "parcel-bundler": "^1.3.1",
    "parcel-plugin-vue": "^1.4.0",
    "vue-template-compiler": "^2.5.13"
  },
  "dependencies": {    
    "vue": "^2.5.13",
    "vue-material": "^1.0.0-beta-7",
    "vue-router": "^3.0.1",
    "vuex": "^3.0.1"
  }
}

main.js

import Vue from '../node_modules/vue/dist/vue';
import { Welcome } from './app/widgets/welcome/welcome.vue';

window.onload = startVue;

function startVue() 
{
    console.dir(Welcome);  //undefined!
    new Vue({
        'el': '#app',   
        'template': Welcome,
        'components': { Welcome }
    });
}