Skip to content

Commit f290775

Browse files
authored
feat: Add in NextJS Webpack specific plugin (#157)
Add in specific plugin for NextJS.
1 parent 4c6e863 commit f290775

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2852
-28
lines changed

.changeset/lucky-rocks-breathe.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@codecov/bundler-plugin-core": minor
3+
"@codecov/nextjs-webpack-plugin": minor
4+
"@codecov/nuxt-plugin": minor
5+
"@codecov/remix-vite-plugin": minor
6+
"@codecov/rollup-plugin": minor
7+
"@codecov/solidstart-plugin": minor
8+
"@codecov/sveltekit-plugin": minor
9+
"@codecov/vite-plugin": minor
10+
"@codecov/webpack-plugin": minor
11+
---
12+
13+
Add in new package for nextjs webpack

.changeset/nervous-onions-hang.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@codecov/nextjs-webpack-plugin": minor
3+
"@codecov/bundler-plugin-core": minor
4+
"@codecov/solidstart-plugin": minor
5+
"@codecov/nuxt-plugin": minor
6+
"@codecov/remix-vite-plugin": minor
7+
"@codecov/rollup-plugin": minor
8+
"@codecov/sveltekit-plugin": minor
9+
"@codecov/vite-plugin": minor
10+
"@codecov/webpack-plugin": minor
11+
---
12+
13+
Add in new extendable types from the plugin core so that we can further customize them in the plugins

.changeset/tidy-pumpkins-yawn.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@codecov/nextjs-webpack-plugin": patch
3+
"@codecov/bundler-plugin-core": patch
4+
"@codecov/solidstart-plugin": patch
5+
"@codecov/nuxt-plugin": patch
6+
"@codecov/remix-vite-plugin": patch
7+
"@codecov/rollup-plugin": patch
8+
"@codecov/sveltekit-plugin": patch
9+
"@codecov/vite-plugin": patch
10+
"@codecov/webpack-plugin": patch
11+
---
12+
13+
Fix jsdoc lint rule issue in solidstart plugin

.eslintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const config = {
1515
"**/node_modules/**",
1616
"**/test-apps/**",
1717
"**/integration-tests/**/*.cjs",
18+
"**/integration-tests/**/*.mjs",
1819
"**/integration-tests/test-api/**/*",
1920
"**/scripts/publish-docs.mjs",
2021
"**/typedoc/plugin-remove-references.js",
@@ -27,6 +28,7 @@ const config = {
2728
"./tsconfig.json",
2829
"./integration-tests/tsconfig.json",
2930
"./packages/bundler-plugin-core/tsconfig.json",
31+
"./packages/nextjs-webpack-plugin/tsconfig.json",
3032
"./packages/nuxt-plugin/tsconfig.json",
3133
"./packages/remix-vite-plugin/tsconfig.json",
3234
"./packages/rollup-plugin/tsconfig.json",

.github/workflows/ci.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,17 @@ jobs:
280280
fail-fast: false
281281
matrix:
282282
example:
283-
["next-js", "nuxt", "remix", "rollup", "sveltekit", "vite", "webpack", "solidstart"]
283+
[
284+
"next-js",
285+
"next-js-15",
286+
"nuxt",
287+
"remix",
288+
"rollup",
289+
"sveltekit",
290+
"vite",
291+
"webpack",
292+
"solidstart",
293+
]
284294
steps:
285295
- name: Checkout
286296
uses: actions/checkout@v4
@@ -354,7 +364,17 @@ jobs:
354364
fail-fast: false
355365
matrix:
356366
example:
357-
["next-js", "nuxt", "remix", "rollup", "sveltekit", "vite", "webpack", "solidstart"]
367+
[
368+
"next-js",
369+
"next-js-15",
370+
"nuxt",
371+
"remix",
372+
"rollup",
373+
"sveltekit",
374+
"vite",
375+
"webpack",
376+
"solidstart",
377+
]
358378
steps:
359379
- name: Checkout
360380
uses: actions/checkout@v4
@@ -430,6 +450,7 @@ jobs:
430450
package:
431451
[
432452
"bundler-plugin-core",
453+
"nextjs-webpack-plugin",
433454
"nuxt-plugin",
434455
"remix-vite-plugin",
435456
"rollup-plugin",
@@ -497,6 +518,7 @@ jobs:
497518
package:
498519
[
499520
"bundler-plugin-core",
521+
"nextjs-webpack-plugin",
500522
"nuxt-plugin",
501523
"remix-vite-plugin",
502524
"rollup-plugin",

examples/next-js-15/.gitignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
.yarn/install-state.gz
8+
9+
# testing
10+
/coverage
11+
12+
# next.js
13+
/.next/
14+
/out/
15+
16+
# production
17+
/build
18+
19+
# misc
20+
.DS_Store
21+
*.pem
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts

examples/next-js-15/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2+
3+
## Getting Started
4+
5+
First, run the development server:
6+
7+
```bash
8+
npm run dev
9+
# or
10+
yarn dev
11+
# or
12+
pnpm dev
13+
# or
14+
bun dev
15+
```
16+
17+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18+
19+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20+
21+
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
22+
23+
## Learn More
24+
25+
To learn more about Next.js, take a look at the following resources:
26+
27+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29+
30+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
31+
32+
## Deploy on Vercel
33+
34+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35+
36+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

examples/next-js-15/app/favicon.ico

25.3 KB
Binary file not shown.

examples/next-js-15/app/globals.css

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
:root {
2+
--max-width: 1100px;
3+
--border-radius: 12px;
4+
--font-mono: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono",
5+
"Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro",
6+
"Fira Mono", "Droid Sans Mono", "Courier New", monospace;
7+
8+
--foreground-rgb: 0, 0, 0;
9+
--background-start-rgb: 214, 219, 220;
10+
--background-end-rgb: 255, 255, 255;
11+
12+
--primary-glow: conic-gradient(
13+
from 180deg at 50% 50%,
14+
#16abff33 0deg,
15+
#0885ff33 55deg,
16+
#54d6ff33 120deg,
17+
#0071ff33 160deg,
18+
transparent 360deg
19+
);
20+
--secondary-glow: radial-gradient(
21+
rgba(255, 255, 255, 1),
22+
rgba(255, 255, 255, 0)
23+
);
24+
25+
--tile-start-rgb: 239, 245, 249;
26+
--tile-end-rgb: 228, 232, 233;
27+
--tile-border: conic-gradient(
28+
#00000080,
29+
#00000040,
30+
#00000030,
31+
#00000020,
32+
#00000010,
33+
#00000010,
34+
#00000080
35+
);
36+
37+
--callout-rgb: 238, 240, 241;
38+
--callout-border-rgb: 172, 175, 176;
39+
--card-rgb: 180, 185, 188;
40+
--card-border-rgb: 131, 134, 135;
41+
}
42+
43+
@media (prefers-color-scheme: dark) {
44+
:root {
45+
--foreground-rgb: 255, 255, 255;
46+
--background-start-rgb: 0, 0, 0;
47+
--background-end-rgb: 0, 0, 0;
48+
49+
--primary-glow: radial-gradient(rgba(1, 65, 255, 0.4), rgba(1, 65, 255, 0));
50+
--secondary-glow: linear-gradient(
51+
to bottom right,
52+
rgba(1, 65, 255, 0),
53+
rgba(1, 65, 255, 0),
54+
rgba(1, 65, 255, 0.3)
55+
);
56+
57+
--tile-start-rgb: 2, 13, 46;
58+
--tile-end-rgb: 2, 5, 19;
59+
--tile-border: conic-gradient(
60+
#ffffff80,
61+
#ffffff40,
62+
#ffffff30,
63+
#ffffff20,
64+
#ffffff10,
65+
#ffffff10,
66+
#ffffff80
67+
);
68+
69+
--callout-rgb: 20, 20, 20;
70+
--callout-border-rgb: 108, 108, 108;
71+
--card-rgb: 100, 100, 100;
72+
--card-border-rgb: 200, 200, 200;
73+
}
74+
}
75+
76+
* {
77+
box-sizing: border-box;
78+
padding: 0;
79+
margin: 0;
80+
}
81+
82+
html,
83+
body {
84+
max-width: 100vw;
85+
overflow-x: hidden;
86+
}
87+
88+
body {
89+
color: rgb(var(--foreground-rgb));
90+
background: linear-gradient(
91+
to bottom,
92+
transparent,
93+
rgb(var(--background-end-rgb))
94+
)
95+
rgb(var(--background-start-rgb));
96+
}
97+
98+
a {
99+
color: inherit;
100+
text-decoration: none;
101+
}
102+
103+
@media (prefers-color-scheme: dark) {
104+
html {
105+
color-scheme: dark;
106+
}
107+
}

examples/next-js-15/app/layout.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import type { Metadata } from "next";
2+
import { Inter } from "next/font/google";
3+
import "./globals.css";
4+
5+
const inter = Inter({ subsets: ["latin"] });
6+
7+
export const metadata: Metadata = {
8+
title: "Create Next App",
9+
description: "Generated by create next app",
10+
};
11+
12+
export default function RootLayout({
13+
children,
14+
}: Readonly<{
15+
children: React.ReactNode;
16+
}>) {
17+
return (
18+
<html lang="en">
19+
<body className={inter.className}>{children}</body>
20+
</html>
21+
);
22+
}

0 commit comments

Comments
 (0)