solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

fix: solid-start merge babel options

Open lxsmnsyc opened this issue 2 years ago • 4 comments

Probably an oversight. solid-start's vite plugin completely omits the babel option for vite-plugin-solid.

As for the server transform, I'm not sure where to put it, but for now I'll just use push.

lxsmnsyc avatar Jul 26 '22 11:07 lxsmnsyc

We also have another section where we use the solid babel compiler and override it with options:

    async transform(code, id, transformOptions) {
      const isSsr =
        transformOptions === null || transformOptions === void 0 ? void 0 : transformOptions.ssr;
      let babelSolidCompiler = (code, id, fn) => {
        // @ts-ignore
        return solid({
          ...(options ?? {}),
          babel: fn
        }).transform(code, id, transformOptions);
      };

Could you see if we could do something about this as well?

Also, thanks for helping with this!

nksaraf avatar Jul 27 '22 23:07 nksaraf

@nksaraf which part is this?

lxsmnsyc avatar Jul 28 '22 02:07 lxsmnsyc

This is the transform function from function solidStartFileSystemRouter(options)

nksaraf avatar Jul 28 '22 02:07 nksaraf

Okay so I've fixed it, not sure with the conflicts

lxsmnsyc avatar Aug 01 '22 07:08 lxsmnsyc