From 2b472d1ea0fb1a9fea33e2b5ad71c0a22bcd56d0 Mon Sep 17 00:00:00 2001 From: Alex Palmer Date: Sun, 12 Mar 2023 08:32:50 +0000 Subject: [PATCH] fix(create-vite): fix broken vite logo when base changed (#12374) --- packages/create-vite/template-lit-ts/src/my-element.ts | 3 ++- packages/create-vite/template-lit/src/my-element.js | 3 ++- packages/create-vite/template-preact-ts/src/app.tsx | 3 ++- packages/create-vite/template-preact/src/app.jsx | 3 ++- packages/create-vite/template-react-ts/src/App.tsx | 3 ++- packages/create-vite/template-react/src/App.jsx | 3 ++- packages/create-vite/template-svelte-ts/src/App.svelte | 9 +++++---- packages/create-vite/template-svelte/src/App.svelte | 7 ++++--- packages/create-vite/template-vanilla-ts/src/main.ts | 3 ++- packages/create-vite/template-vanilla/main.js | 3 ++- 10 files changed, 25 insertions(+), 15 deletions(-) diff --git a/packages/create-vite/template-lit-ts/src/my-element.ts b/packages/create-vite/template-lit-ts/src/my-element.ts index 8649da3b8b20a7..010d1481d3d867 100644 --- a/packages/create-vite/template-lit-ts/src/my-element.ts +++ b/packages/create-vite/template-lit-ts/src/my-element.ts @@ -1,6 +1,7 @@ import { LitElement, css, html } from 'lit' import { customElement, property } from 'lit/decorators.js' import litLogo from './assets/lit.svg' +import viteLogo from '/vite.svg' /** * An example element. @@ -26,7 +27,7 @@ export class MyElement extends LitElement { return html`
- + diff --git a/packages/create-vite/template-lit/src/my-element.js b/packages/create-vite/template-lit/src/my-element.js index c7fc6f7e3a313e..e00405cc057123 100644 --- a/packages/create-vite/template-lit/src/my-element.js +++ b/packages/create-vite/template-lit/src/my-element.js @@ -1,5 +1,6 @@ import { LitElement, css, html } from 'lit' import litLogo from './assets/lit.svg' +import viteLogo from '/vite.svg' /** * An example element. @@ -32,7 +33,7 @@ export class MyElement extends LitElement { return html`
- + diff --git a/packages/create-vite/template-preact-ts/src/app.tsx b/packages/create-vite/template-preact-ts/src/app.tsx index ccde5b9f39b1d0..b1f47a1d03fd31 100644 --- a/packages/create-vite/template-preact-ts/src/app.tsx +++ b/packages/create-vite/template-preact-ts/src/app.tsx @@ -1,5 +1,6 @@ import { useState } from 'preact/hooks' import preactLogo from './assets/preact.svg' +import viteLogo from '/vite.svg' import './app.css' export function App() { @@ -9,7 +10,7 @@ export function App() { <>
- + diff --git a/packages/create-vite/template-preact/src/app.jsx b/packages/create-vite/template-preact/src/app.jsx index 2679f488673db1..343021ac1211cd 100644 --- a/packages/create-vite/template-preact/src/app.jsx +++ b/packages/create-vite/template-preact/src/app.jsx @@ -1,5 +1,6 @@ import { useState } from 'preact/hooks' import preactLogo from './assets/preact.svg' +import viteLogo from '/vite.svg' import './app.css' export function App() { @@ -9,7 +10,7 @@ export function App() { <>
- + diff --git a/packages/create-vite/template-react-ts/src/App.tsx b/packages/create-vite/template-react-ts/src/App.tsx index cd201360b421e4..776eaa027ab01e 100644 --- a/packages/create-vite/template-react-ts/src/App.tsx +++ b/packages/create-vite/template-react-ts/src/App.tsx @@ -1,5 +1,6 @@ import { useState } from 'react' import reactLogo from './assets/react.svg' +import viteLogo from '/vite.svg' import './App.css' function App() { @@ -9,7 +10,7 @@ function App() {
- Vite logo + Vite logo React logo diff --git a/packages/create-vite/template-react/src/App.jsx b/packages/create-vite/template-react/src/App.jsx index ef0adc0d53eba9..2ba469dc82918f 100644 --- a/packages/create-vite/template-react/src/App.jsx +++ b/packages/create-vite/template-react/src/App.jsx @@ -1,5 +1,6 @@ import { useState } from 'react' import reactLogo from './assets/react.svg' +import viteLogo from '/vite.svg' import './App.css' function App() { @@ -9,7 +10,7 @@ function App() {
- Vite logo + Vite logo React logo diff --git a/packages/create-vite/template-svelte-ts/src/App.svelte b/packages/create-vite/template-svelte-ts/src/App.svelte index 7ffd3bc08bfffb..e8b590f1f50599 100644 --- a/packages/create-vite/template-svelte-ts/src/App.svelte +++ b/packages/create-vite/template-svelte-ts/src/App.svelte @@ -1,14 +1,15 @@
@@ -43,4 +44,4 @@ .read-the-docs { color: #888; } - \ No newline at end of file + diff --git a/packages/create-vite/template-svelte/src/App.svelte b/packages/create-vite/template-svelte/src/App.svelte index 5a186956d302e4..1f31354ec8cfeb 100644 --- a/packages/create-vite/template-svelte/src/App.svelte +++ b/packages/create-vite/template-svelte/src/App.svelte @@ -1,14 +1,15 @@
diff --git a/packages/create-vite/template-vanilla-ts/src/main.ts b/packages/create-vite/template-vanilla-ts/src/main.ts index df7c82c3cae37d..76dbee315d13f3 100644 --- a/packages/create-vite/template-vanilla-ts/src/main.ts +++ b/packages/create-vite/template-vanilla-ts/src/main.ts @@ -1,11 +1,12 @@ import './style.css' import typescriptLogo from './typescript.svg' +import viteLogo from '/vite.svg' import { setupCounter } from './counter' document.querySelector('#app')!.innerHTML = `