Replies: 1 comment 2 replies
-
Using the Rollup plugin, we do this to rename the output files: // rollup.config.mjs
export default {
// Your other options go here...
output: {
dir: "dist",
// Rename output VE styles to `.styles.css`
assetFileNames: ({ names }) => names[0]?.replace(/\.css.ts.vanilla\.css$/, ".styles.css") ?? "",
// Rename `.css.js` files to `.styles.js`, so they are not re-processed by the user's Vanilla-Extract
entryFileNames: ({ name }) => `${name.replace(/\.css$/, ".styles")}.js`,
},
plugins: [vanillaExtractPlugin()],
}; Maybe you can do sth similar for Vite. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was wondering if it is possible to change the default behaviour and file extensions from
style.css.ts
to something else within a build tool like vitejs. I have a library which provide styles in this format ([name].css.(js|ts)
) and it breaks with the build tool.Or does anyone have any advice how I could circumvent this with the build tool. I couldn't find anything in the documentation of the vite plugin
@vanilla-extract/vite-plugin
Beta Was this translation helpful? Give feedback.
All reactions