-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
Vite 6: Explore possible improvements #1214
Comments
Wrote a simple test to see how to use the environment APIs to build multiple bundles at once. The API is much nicer to use but performance wise, Did not profile memory usage nor did I look into changes to dev mode or importing TS files, so still some work to do. |
Hello, not sure you had that in your radar, but we were prompted with vite6 dep update, and it seems that the vite (https://wxt.dev/guide/essentials/config/vite.html) method to define the config isn't really type compatible anymore. properties like resolve alias & plugins |
@eMerzh You probably have multiple versions of Vite installed. Type errors like this are usually a sign of this. I just released a new version of WXT that adds support for Vite 6: Update WXT, then delete your lockfile or run |
awesome @aklinker1 it makes the trick 💪 thanks |
A vite template for using React Compiler would be a great addition or at least one example showing how to do it. |
Huh, does the regular react vite plugin not include the compiler already? |
You have to turn it on and when I tried turning it on it was giving me errors https://react.dev/learn/react-compiler below was my attempt of integrating it import { defineConfig } from 'wxt';
import { defineRunnerConfig } from 'wxt';
import { defineWxtModule } from 'wxt/modules';
export interface CustomCommandOptions {
// Add any options your command needs
commandName?: string;
}
// See https://wxt.dev/api/config.html
export default defineConfig({
extensionApi: 'chrome',
modules: ['@wxt-dev/module-react', '@wxt-dev/auto-icons'],
manifest: {
permissions: ["activeTab", "scripting", "sidePanel", "storage", "tabs", "history", "unlimitedStorage", "commands"],
description: "A browser extension that allows you to view and interact with your browser history in a side panel.",
},
runner: defineRunnerConfig({
disabled: true
}),
manifestVersion: 3,
autoIcons: {
enabled: true,
grayscaleOnDevelopment: true
},
dev: {
server: {
port: 5180
}
},
vite: () => ({
plugins: [
['babel-plugin-react-compiler', {}]
]
})
});
This is the error I was getting
|
@remusris See the README for the react module: https://www.npmjs.com/package/@wxt-dev/module-react To pass options to the react plugin, like the // wxt.config.ts
export default defineConfig({
modules: ['@wxt-dev/module-react'],
react: {
vite: {
babel: {
plugins: [["babel-plugin-react-compiler", { ... }]
}
},
},
}); |
Feature Request
Two parts:
vite
dependency range to support v6 #1215 - Vite 6 worked, no errorsIs your feature request related to a bug?
N/A
What are the alternatives?
N/A
Additional context
https://vite.dev/blog/announcing-vite6.html
The text was updated successfully, but these errors were encountered: