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(build): add option for renaming output css filename #702

Closed
wants to merge 1 commit into from

Conversation

Frulko
Copy link

@Frulko Frulko commented Aug 12, 2020

Following this issue : #378 and my response.
I have added an option for renaming css output filename with two way : string or callback with return text.
Currently the css filename format is hardcoded in buildPluginCss.ts.
It allow user handle and format the filename as it want.

It's my first PR for an open-source project tell if I'have done something wrong in the workflow of developing vite and contribute to the project. I tried to follow the git commit formatting rule and the contributing guide.
The only thing I not make it's a Jest test case. It's a small option but if you want I can make one.

cssFileName = modulesOptions!.cssFileName
} else {
cssFileName = modulesOptions!.cssFileName(staticCss)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we add a option hash on build and we should add hash for output filename (include js, css, asset) if it is true .What do you think?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An option for hash is a good idea, a option for renaming css file too.
I could make the change :)

@yyx990803 yyx990803 closed this Jan 2, 2021
@yyx990803 yyx990803 deleted the branch vitejs:master January 2, 2021 18:17
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.

3 participants