-
I'm trying to get a project off the ground that uses Sequelize. I would like to define the models using sequelize-typescript using decorators. I added the Babel plugin for decorators:
SolidStart builds find and I am able to get the server to listen. The trouble comes when I actually try to access the page, the server crashes with this error:
It looks like the SSR stuff isn't using the Babel plugin. Any ideas on how I can get decorator support on the SSR code? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
After bumping into this issue myself, spending a lot of time searching for a solution and then looking at the definition of the export default defineConfig({
[...],
solid: {
babel: {
plugins: [["@babel/plugin-syntax-decorators", {legacy: true}]]
}
} as any
}); The I don't know why I added the |
Beta Was this translation helpful? Give feedback.
After bumping into this issue myself, spending a lot of time searching for a solution and then looking at the definition of the
defineConfig
function here, I think I figured it out. You can actually add asolid
property to the object you are passing todefineConfig
which can have ababel
property containing the required plugin configuration:The
as any
seems to be needed as there are some properties that are required in the object assigned to solid, but in thedefineConfig
function, the default for the object is the empty object, so that …