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

Rollup replaces output file #130

Closed
ramanarupa opened this issue May 23, 2024 · 3 comments
Closed

Rollup replaces output file #130

ramanarupa opened this issue May 23, 2024 · 3 comments
Labels

Comments

@ramanarupa
Copy link

ramanarupa commented May 23, 2024

when I'm trying to use such configuration, rollup replaces sass output file by file which generated by rollup itself

import sass from 'rollup-plugin-sass';

export default [
  {
    input: 'App/sass/index.scss',
    output: {
      file: 'myfile.css',
    },
    plugins: [
      sass({
        output: 'myfile.css,
        options: {
          outputStyle: 'compressed',
        },
      }),
    ],
  }
];

how to resolve this issue ?

@elycruz elycruz added the triaged Deprecated - Use "groomed" instead. label May 29, 2024
@elycruz elycruz self-assigned this May 29, 2024
@elycruz
Copy link
Owner

elycruz commented May 29, 2024

Currently the plugin doesn't support *.css files (the supported extensions are currently hard-coded in the plugin).

I've opened a new ticket for adding the ability to set the extensions the plugin recognizes at runtime (ticket no. below).

Please subscribe to #131 - The work will be performed via there.

@elycruz elycruz removed their assignment May 29, 2024
@elycruz
Copy link
Owner

elycruz commented Jun 25, 2024

@ramanarupa Question, is it that the files are replaced with empty files, and/or are the files replaced but with "uncompressed" content?

@elycruz
Copy link
Owner

elycruz commented Aug 18, 2024

After looking at your code more closely it is clear that rollup overwrites your file because you have it listed as it's output file. Additionally, we're not going to support pure *.css files, as part of our plugin, due to 'dart-sass' not supporting *.css imports (by default). If you need pure css files support I recommended using 'postcss' (or one of the rollup compatible ones), in your build pipeline.

@elycruz elycruz closed this as completed Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants