Skip to content

Commit 550f3a4

Browse files
author
Yaroslav Kasperovich
committed
Add babel support
1 parent 5936da4 commit 550f3a4

File tree

4 files changed

+1058
-10
lines changed

4 files changed

+1058
-10
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CoffeeScript2 support for the projects created with [@vue/cli](https://github.co
55
With built-in:
66
* `cache-loader`
77
* `thread-loader`
8+
* `babel-loader`
89
* `src/main.coffee` support if you're not using `config.pages`
910

1011
## Installation

index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ module.exports = (API, projectOptions) => {
2020
);
2121
}
2222

23+
if (api.hasPlugin("babel")) {
24+
coffeeRule
25+
.use("babel-loader")
26+
.loader(require.resolve("babel-loader"))
27+
.options({
28+
presets: ["@babel/preset-env"],
29+
});
30+
}
31+
2332
coffeeRule.use("coffee-loader").loader(require.resolve("coffee-loader"));
2433
});
2534
};

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-cli-plugin-coffee",
3-
"version": "0.4.0",
3+
"version": "0.5.0",
44
"description": "CoffeeScript2 support for your @vue/cli project",
55
"main": "index.js",
66
"repository": {
@@ -27,6 +27,9 @@
2727
"prettier": "^2.0.5"
2828
},
2929
"dependencies": {
30+
"@babel/core": "^7.9.6",
31+
"@babel/preset-env": "^7.9.6",
32+
"babel-loader": "^8.1.0",
3033
"cache-loader": "^4.1.0",
3134
"coffee-loader": "^1.0.0",
3235
"thread-loader": "^2.1.3"

0 commit comments

Comments
 (0)