Hi, I'm trying to use decorators in Nuxt.js.
I tried to edit .babelrc by setting build.babel.babelrc to true, and adding a babelrc that includes the babel-plugin-transform-decorators as a plugin.
But the compilation did not work though.
Is it because the Node.js do not support decorators yet so that I could not use decorator in SSR?
It works for me.
npm install --save-dev babel-plugin-transform-decorators-legacy
nuxt.config.js
build: {
babel: {
plugins: ['babel-plugin-transform-decorators-legacy']
}
}
@dotneet Thanks, it works now.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
It works for me.
nuxt.config.js