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

feat: Handle scss, sass or less as input correctly #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

daniel-rose
Copy link

@daniel-rose daniel-rose commented Feb 10, 2025

Currently, inputs of type scss, sass or less are rendered with the script tag. This pull request ensures that the link tag provided for this purpose is used.

Here is an example vite configuration that can be used to simulate the problem:

...

export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
  ...

  return {
    server: {
      origin: 'http://foo.bar',
      ...
    },
    build: {
      manifest: true,
      rollupOptions: {
        input: ['./src/foo.tsx', './src/scss/bar.scss'],
        ...
      },
    },
    ...
  }
})

@mindplay-dk
Copy link
Owner

hi Daniel,

sorry, but I don't understand the use-case or the changes you're proposing.

when or why would you have an .scss (etc) file as an entry-point?

are you building a library? and in that case, why would you want to emit tags?

are you just trying to make the CSS load? in that case import "/scss/bar.scss" from foo.tsx and it should preload.

either way, I'm not comfortable merging a change like this without test coverage.

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