From 81ad503d95b82d9e33e26b187fe320f8d9b2fab8 Mon Sep 17 00:00:00 2001 From: HG Date: Mon, 8 Oct 2018 23:58:21 +0100 Subject: [PATCH] Update README.md How to get this module to work with nuxt 2 and babel 7 --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 36d0acf..5c2747e 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,20 @@ npm install --save nuxt-class-component yarn add nuxt-class-component ``` -### Babel Instructions +### Babel 7 Instructions +```js +module.exports = { + build: { + babel: { + plugins: [ + ["@babel/plugin-proposal-decorators", { legacy: true }], + ["@babel/plugin-proposal-class-properties", { loose: true }] + ] + }, + } +} +``` +### Babel 6 Instructions ```bash npm install --save-dev babel-plugin-transform-decorators-legacy babel-plugin-transform-class-properties