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

Sass compilation #182

Closed
guibulator opened this issue Nov 3, 2023 · 3 comments
Closed

Sass compilation #182

guibulator opened this issue Nov 3, 2023 · 3 comments

Comments

@guibulator
Copy link

Environment

Node 18.15.0.
mkdist: latest

Reproduction

No reproduction

Describe the bug

As per the documentation in https://github.com/nuxt/module-builder, it's mentioned that only js, ts and vue files would be transformed.

runtime/*: Individually transformed files using [unjs/mkdist](https://github.com/unjs/mkdist)
Javascript and .ts files will be transformed to .mjs with extracted types on .d.ts file with same name
.vue files will be transformed with extracted .d.ts file
-> Other files will be copied as is

I have an issue where sass files are transformed to empty css but I would like the scss file to be copied as is. I see from the tests that scss files are compiled:

"dist/demo.css",

Is there a way to opt-out of this and to just copy the file as is?

Additional context

No response

Logs

No response

@ennioVisco
Copy link

ennioVisco commented Nov 9, 2023

It should have been addressed in 1.3.0, as it is mentioned in #152, which is mentioned in the release details.
Are you sure you are using the latest version of mkdist?

@guibulator
Copy link
Author

guibulator commented Nov 9, 2023

I do use the latest version. So based off of the PR you mentioned, I see that the default loaders are now this
https://github.com/wd-4000/mkdist/blob/22515607be5b47b9f065fa41a3fc8ca297b125af/src/loaders/index.ts

export const defaultLoaders: LoaderName[] = ["js", "vue", "sass"];

We can configure the loaders using the mkdist options.
So from mkdist perspective, it works. But we can't configure the nuxt-module-builder it seems and it will take the default which does sass compilation but as per their documentation, it shouldn't try to compile sass.
I guess I will open a ticket in nuxt-module-builder then to allow configuring loaders.

@pi0
Copy link
Member

pi0 commented Jan 21, 2024

Hi and sorry for responding late. Let's track it via nuxt/module-builder#90 to allow opting out from this behavior.

@pi0 pi0 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 21, 2024
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

No branches or pull requests

3 participants