-
|
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
defineConfigfunction here, I think I figured it out. You can actually add asolidproperty to the object you are passing todefineConfigwhich can have ababelproperty containing the required plugin configuration:The
as anyseems to be needed as there are some properties that are required in the object assigned to solid, but in thedefineConfigfunction, the default for the object is the empty object, so that …