CoffeeScript2 support for your @vue/cli project
npm install vue-cli-plugin-coffeeCoffeeScript2 support for the projects created with @vue/cli.
With built-in:
* cache-loader
* thread-loader
* babel-loader
According to this you are able to install community plugins as follows:
``shell`
vue add coffee
__ESLINT Note__: Please visit "EsLint Integration" Section below on how to make this plugin work with eslint (else, it will return errors on coffeescript code).
If you don't need eslint, you can just uninstall it.
`shell`ONLY if you don't need eslint
npm remove @vue/cli-plugin-eslint
Usually you write SFC like this
`vue
`
According to this you can add entries using your vue.config.js like so:
`javascript
// vue.config.js
module.exports = {
configureWebpack: {
entry: {
'new-entry': 'path/to/new/entry.coffee'
}
}
}
`
to identify components which are using Coffeescript, but lang="coffee" is not recognizable for ESLint. There are 2 ways on how you can make this plugin work with eslint:
1. __Coffeescript ESLint Support__
https://github.com/helixbass/eslint-plugin-coffee
2. __Ignore Coffeescript Syntax__
ESLint (following traditional HTML) uses
type="xxx" to identify the type of scripts. As long as a