Vite temp file problem #212
Answered
by
meteorlxy
Mister-Hope
asked this question in
Q&A
-
I am writing temp files and makeing alias for it. It works prefect on webpack, but throw errors on vite:
Related code (edited): export const palettePlugin: Plugin<PaletteOptions> = ({ id = 'hope' }) => {
return {
name: `palette-${id}`,
alias: {
[`@${id}/palette`]: `@temp/styles/${id}-palette.scss`,
},
async onPrepared(): Promise<void> {
await app.writeTemp(
`styles/${id}-palette.scss`,
`
some content
`
);
},
};
}; Description: I am writing While it only works on webpack, but throws the error on vite as vite seems cannot find |
Beta Was this translation helpful? Give feedback.
Answered by
meteorlxy
Jun 13, 2021
Replies: 1 comment 2 replies
-
Seems that the alias could not be resolved recursively. Try this:
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
Mister-Hope
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Seems that the alias could not be resolved recursively. Try this: