Skip to content
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

Coffeescript support #56

Open
phil294 opened this issue Nov 15, 2020 · 0 comments
Open

Coffeescript support #56

phil294 opened this issue Nov 15, 2020 · 0 comments

Comments

@phil294
Copy link

phil294 commented Nov 15, 2020

Describe the bug
Cannot read '$meta' of undefined. Seems very similar to #45.

To Reproduce
I tried integrating UVue into a .coffee only repository (that is, no .js files present at all). The compilation step is baked into vue.config.js, and it all worked almost flawlessly and it's great. There is just one small drawback:
main.js needs to be a Javascript file. If I keep it at main.coffee, I get the above error message.

For reproducing this, here is my CS compilation setup:

package.json:

"coffee-loader": "^1.0.0",
"coffeescript": "^2.5.1",

vue.config.js:

    config.resolve.extensions
      .add('.coffee')
    config.module
      .rule('coffee')
        .after('vue')
        .test(/\.coffee$/)
          .use('coffee/babel')
            .loader('babel-loader')
            .end()
          .use('coffee/loader')
            .loader('coffee-loader')
            .end()
        .end()

Alternatively, one could probably also just use cxspxr/vue-cli-plugin-coffee

Expected behavior
No errors.

Additional context
Changing uvue.config.js's paths.main to './src/main.coffee' does not help and only results in syntax errors.

This issue is probably low priority, as keeping the main file in Javascript is no great obstacle. But maybe this will help others with the same issue.

Thanks!

Please indicate versions of:

node: 11.15.0
vue-cli: 4.4.6
uvue: 0.17
os: Linux 5.8.18-1-MANJARO
browser: Chromium
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants