-
-
Notifications
You must be signed in to change notification settings - Fork 156
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
when outfile format cjs,vue style lose from dynamic import #27
Comments
This comment was marked as spam.
This comment was marked as spam.
1 similar comment
This comment was marked as spam.
This comment was marked as spam.
@Veiintc Do you ask for a |
Is this a low priority issue? |
I'm not sure right now. I'm not as deep into it and know what is happening here, so I cannot assign a label like p3 or p4 or p5. |
Hi, @Veiintc can you explain an expected behaviour, please? Do you expect "CJS" CommonJS module to be in your build or what? And why you marked the CSS file on your screenshot? Thanks a lot |
it seems my description is not accurate enough, |
@Veiintc gotta. I think I get you. I opened your reproduction repo. As I understand you can't find styles from your If I get you right and it is. So, you don't include your CSS module file in your project and the needed styles will NOT be in your prod build. Now they are unused and they don't have to be in your build. They are not in the module graph. I added this script line in your component <template>
<h2>Scan Deps from <script setup lang=ts> blocks</h2>
<div class="scan">{{ typeof debounce === 'function' ? 'ok' : 'error' }}</div>
</template>
<script>
import classes from './common.module.less'
</script>
<style lang="less" scoped>
.scan{
color: blue;
}
</style> And now I can see the needed styles in my final production build by executing the command ._root_xlv1v_1 {
color: red;
}
.scan[data-v-4e39fff2] {
color: blue;
} |
Thank you for your reply, |
are you format cjs? |
Man, I just run your project, that you provided. Where is the file in CJS format? I don't understand |
are you run dev ? |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Describe the bug
vitejs/vite#3101 had fixed for es,but cjs not
and How can I clean b_vue_vue_type_style_index_0_scoped_true_lang?
Reproduction
https://github.com/Veiintc/vite-cjs-csslose.git
System Info
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: