Joe Pea
Joe Pea
SSolidJS
Created by Joe Pea on 11/19/2023 in #support
How do we configure babel proposal decorators with Solid's vite plugin?
I've got this Stackblitz: https://stackblitz.com/edit/solidjs-templates-wyjc1i?file=index.html,src%2Findex.tsx,vite.config.ts,package.json No luck configuring decorators like so:
export default defineConfig({
plugins: [
solidPlugin({
babel: {
plugins: ['@babel/plugin-proposal-decorators', { version: '2023-05' }],
},
}),
],
export default defineConfig({
plugins: [
solidPlugin({
babel: {
plugins: ['@babel/plugin-proposal-decorators', { version: '2023-05' }],
},
}),
],
Stackblitz terminal shows this error:
[BABEL] /home/projects/solidjs-templates-wyjc1i/src/index.tsx: The decorators plugin, when .version is '2018-09' or not specified, requires a 'decoratorsBeforeExport' option, whose value must be a boolean. (While processing: "/home/projects/solidjs-templates-wyjc1i/node_modules/.pnpm/@babel+plugin-proposal-decorators@7.23.3_@babel+core@7.22.5/node_modules/@babel/plugin-proposal-decorators/lib/index.js$inherits")
[BABEL] /home/projects/solidjs-templates-wyjc1i/src/index.tsx: The decorators plugin, when .version is '2018-09' or not specified, requires a 'decoratorsBeforeExport' option, whose value must be a boolean. (While processing: "/home/projects/solidjs-templates-wyjc1i/node_modules/.pnpm/@babel+plugin-proposal-decorators@7.23.3_@babel+core@7.22.5/node_modules/@babel/plugin-proposal-decorators/lib/index.js$inherits")
Ask me why I have tooling fatigue. 🙃 Buildless for the win.
7 replies