Skip to content

chore: Test vite plugin custom path normalization #258

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions examples/vite/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useState, lazy, Suspense } from "react";
import reactLogo from "./assets/react.svg";
import viteLogo from "/vite.svg";
import "./App.css";
import SomeComponent from "./SomeComponent";

const IndexedLazyComponent = lazy(() => import("./IndexedLazyComponent"));
const LazyComponent = lazy(() => import("./LazyComponent/LazyComponent"));
Expand Down Expand Up @@ -37,6 +38,9 @@ function App() {
<Suspense fallback={null}>
<LazyComponent />
</Suspense>
<Suspense fallback={null}>
<SomeComponent />
</Suspense>
</>
);
}
Expand Down
7 changes: 7 additions & 0 deletions examples/vite/src/SomeComponent.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function SomeComponent() {
return (
<div>
<h1>Some Component</h1>
</div>
);
}
18 changes: 10 additions & 8 deletions examples/vite/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import { codecovVitePlugin } from "@codecov/vite-plugin";

// https://vitejs.dev/config/
export default defineConfig({
build: {
rollupOptions: {
output: {
assetFileNames: "[name].[hash].js",
chunkFileNames: "[name]-[hash].js",
},
},
},
// build: {
// rollupOptions: {
// output: {
// assetFileNames: "[name].[hash].js",
// chunkFileNames: "[name]-[hash].js",
// },
// },
// },
plugins: [
react(),
codecovVitePlugin({
Expand All @@ -20,6 +20,8 @@ export default defineConfig({
uploadToken: process.env.VITE_UPLOAD_TOKEN,
apiUrl: process.env.VITE_API_URL,
debug: true,
assetFileNames: "[name].[hash].js",
chunkFileNames: "[name]-[hash].js",
}),
],
});
Loading