Closed adeel41 closed 6 years ago
@adeel41 So, in this part of your pubspec
:
- vue2:
entry_points:
- web/index.dart
entry_points
is defining your main files; this is needed for components to be automatically globally registered.
In your example, it seems you've named your main file main.dart
, so that needs to be changed to:
- vue2:
entry_points:
- web/main.dart # <-- index.dart changed to main.dart
This is mentioned in the documentation:
TL;DR: all your Dart files that define main and also setup a Vue app should be in entry_points.
but now that I look at it again, I don't think I explained this well enough...this has even happened to me enough times that I should make it a bit more obvious, and probably add an FAQ entry or something...
Thanks that fixed my problem. I guess I didn't realized it because I use Webstorm editor and pick Bare-bones Web App
template to generate the application which always generates a main.dart
file.
And then I copied transformer stuff from your example without giving it a second thought that why it is needed.
Anyways thanks and sorry for late reply
FWIW I'm going to leave this open for a bit until I fix the docs since I'll end up forgetting otherwise.
I am trying to create a very simple component but keep getting this error. I understand this error is returned by Vue and and not Vuedart but I think the problem is it is not including the
add-location
component I am pasting everything which I've written so far. Any help is much appreciatedmain.dart
index.html
add_location.dart
pubspec.yaml
And the following files are after running the transformer in debug mode
main.dart
index.html
add_location.dart