Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pass solid compiler options to route pages #1029

Merged
merged 2 commits into from
Aug 29, 2023

Conversation

yume-chan
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • infrastructure changes
  • Other... Please describe:

What is the current behavior?

For interoperating with some third-party libraries, I have to disable event delegation in Solid using this Vite config:

import solid from "solid-start/vite";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [
    solid({
      solid: {
        delegateEvents: false,
      },
    }),
  ],
});

Now components in components folder start to use native events:

image

However, this options was not passed to solid-start-file-system-router, causing components in routes folder to continue using delegated events:

image

Notice that this causes Linaria plugin to throw errors.

What is the new behavior?

Custom compiler options are passed to route pages, components in routes folder no longer uses delegated events, Linaria plugin runs without any error.

image

Other information

@ryansolid ryansolid merged commit 63dfdcc into solidjs:main Aug 29, 2023
9 checks passed
@yume-chan yume-chan deleted the fix/router-options branch August 30, 2023 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants