-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot build module inside .vue file #3
Comments
Error is because here: in sourceFile variable we have such value: How it was processed in coffescript. I suggest add here nested try-catch block: And if "standard" way of compiling failed, try to compile given by webpack source code with inline (if I understand this term rightly) source map (i.e. just compile caffeinescript source string to JS one). So we wouldn't have any specific to Vue code, this should help to solve any further problems with integrating to other frameworks. Or, maybe, to add check before try block: does file exists in file system. |
Interesting. I'm not familiar with how Vue handles compile-routing. I'm guessing this file doesn't actually exist in the file-system, at least not -exactly- as this string specifies:
CaffeineMC expects sourceFile to resolve to a real file. Could you post the "real" file's full path? Is it this?
CaffeineMC should work if sourceFile is null. It 'should' work, but it may not. If it doesn't, that's a bug I can resolve. Otherwise, sourceFile needs to be a real file... |
@shanebdavis , yes, my file is But that .vue file, as you see, doesn't have supported by caffeinescript structure. I think, it would be easier in case of such strange links, which are absent on file system, just to compile passed code. What do you think about, at least, checking: is link in a valid format (for UNIX / WINDOWS), and if format is unknonwn - throw away it and think that sourceFile is absent ? |
@shanebdavis , if you'd like to reproduce it, you can clone repository: |
@shanebdavis , seems, I got it, file needs to be present there for automatic imports feature. Can automatic imports be disabled for "real-time" compiling projects, like vue, or, probably, to compile it in browser ? |
Hello.
Earlier used CaffeineScript separately - all worked well. Recently started project with .vue files instead of .html, .js, .css, .caffeine.
(something like jsx, but with .vue extension)
error text:
vue plugin for CaffeineScript:
File index.js just adds Caffeine webpack loader to webpack config.
File generator.js just adds caffeine-script package to package.json
So almost nothing vue-specific here.
I think that problem is related to impossibility to parse inline text inside .vue file by caffeine webpack loader.
Maybe you could see anything here.
Will try to solve it manually that time.
The text was updated successfully, but these errors were encountered: