Closed adeel41 closed 6 years ago
I think I know where this is coming from, though I'm unable to access a computer to fix it at the moment...
I created a new project to replicate the issue but it worked fine in this new project. So then i thought may be I've added some files which are causing this so I removed everything i.e. ( all of my dart files, .pub, .packages, pubspec.lock) and copied everything exactly from the working new project then build it in debug mode but it still has the same issue.
<head>
<title>VueDart first example. 1</title>
<script src="https://unpkg.com/vue"></script>
<script defermain.initialize.dartn.dart" type="application/dart"></script>
<script defer src="packages/browser/dart.js"></script>
</head>dy vuedart>
<div id="app">
<input v-model="name">
<p>Your name is {{name}} or {{capitalizedName}}</p>
</div>
</body>
As you can see I added <title>VueDart first example. **1**</title>
to confirm it is picking up correct files and not caching.
Hmm, I can't seem to reproduce this...I just created a new project via vuedart create tst
(which doesn't have the newline) and ran pub build ---mode debug
, and the output in build/web/index.html
looks fine. Can you run pub deps
and post the output here? I feel like this might be some weird bug in another library (e.g. source_span).
Sorry I am unable to replicate it now. I was having that issue when I was experimenting and then I got that error and then somehow I made a change somewhere and it was fixed. Not sure what that fix is ( I thought it was due to importing a library of components instead of importing them individually but its not that ). You can close this issue for now and I'll re-open it when I'll have some details on how to replicate it. Sorry for the trouble
Hmm... I'm guessing either at some point, in your fiddling, a dependency got changed to a fixed version, or you just appeased the code gods and magically made the code work. :/
I've noticed that transformer expects an empty line after
<script src="https://unpkg.com/vue"></script>
So if in your index.html file your code is likethen in browser you see it outputs
"dy vuedart>"
but if your code is likenotice that this time I've added an empty line in between of these two script tags. So this will work
In your example code on your site, you have added empty lines so everything works fine but then if someone runs their code formatter which removes extra empty lines then they won't understand why suddenly it is not working at all.