fix(05-01): switch Vite alias to array syntax with RegExp find pattern
- Replace object alias syntax with array of {find, replacement} entries
- '@' and 'lexical' aliases preserved as string find entries
- OnboardingWizard alias uses RegExp /^\.\/components\/OnboardingWizard$/ find
- RegExp matches raw import specifier from App.tsx in both dev and prod modes
This commit is contained in:
parent
7c25e37b17
commit
9146b502d9
1 changed files with 14 additions and 7 deletions
|
|
@ -6,13 +6,20 @@ import tailwindcss from "@tailwindcss/vite";
|
|||
export default defineConfig({
|
||||
plugins: [react(), tailwindcss()],
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "./src"),
|
||||
lexical: path.resolve(__dirname, "./node_modules/lexical/Lexical.mjs"),
|
||||
// [nexus] Replace upstream OnboardingWizard with Nexus single-step version
|
||||
[path.resolve(__dirname, "src/components/OnboardingWizard")]:
|
||||
path.resolve(__dirname, "./src/components/NexusOnboardingWizard"),
|
||||
},
|
||||
alias: [
|
||||
{ find: "@", replacement: path.resolve(__dirname, "./src") },
|
||||
{
|
||||
find: "lexical",
|
||||
replacement: path.resolve(__dirname, "./node_modules/lexical/Lexical.mjs"),
|
||||
},
|
||||
// [nexus] Replace upstream OnboardingWizard with Nexus single-step version.
|
||||
// RegExp required: string keys match the RAW import specifier (not resolved path).
|
||||
// App.tsx imports './components/OnboardingWizard' — must match exactly.
|
||||
{
|
||||
find: /^\.\/components\/OnboardingWizard$/,
|
||||
replacement: path.resolve(__dirname, "./src/components/NexusOnboardingWizard"),
|
||||
},
|
||||
],
|
||||
},
|
||||
server: {
|
||||
port: 5173,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue