Skip to content

Commit 54a9be4

Browse files
authored
Merge pull request #5 from Applelo/dev
Version 1.1.1
2 parents 7c4f2d8 + f4d07f3 commit 54a9be4

File tree

9 files changed

+517
-816
lines changed

9 files changed

+517
-816
lines changed

.eslintrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
This plugin adds preload links by getting output assets from the build tools you are using.
66

77
Supporting:
8-
- Vite 3 and 4 (on build only)
8+
- Vite 3 and 4 **(on build only)**
99
- Webpack 5 (with HTMLWebpackPlugin 5)
1010
<!-- - Rspack -->
1111

12+
> [!NOTE]
1213
> This plugin combines [vite-plugin-inject-preload](https://github.com/Applelo/vite-plugin-inject-preload) and [html-webpack-inject-preload](https://github.com/principalstudio/html-webpack-inject-preload) into one package.
1314
15+
> [!NOTE]
1416
> See the [migration guide](#migrate) for `vite-plugin-inject-preload` and `html-webpack-inject-preload` .
1517
1618
## Install
@@ -40,6 +42,9 @@ export default defineConfig({
4042

4143
Example: [`playground/vitejs`](./playground/vitejs)
4244

45+
> [!IMPORTANT]
46+
> The Vite plugin [only works on build](https://github.com/Applelo/vite-plugin-inject-preload/issues/15) because of the way Vite behave.
47+
4348
<br></details>
4449

4550
<details>

eslint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import antfu from '@antfu/eslint-config'
2+
3+
export default antfu()

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "unplugin-inject-preload",
33
"type": "module",
4-
"version": "1.1.0",
4+
"version": "1.1.1",
55
"packageManager": "pnpm@8.7.0",
66
"description": "Inject <link rel='preload'> for Webpack/ViteJS",
77
"license": "MIT",
@@ -84,24 +84,24 @@
8484
},
8585
"dependencies": {
8686
"mime-types": "^2.1.35",
87-
"unplugin": "^1.4.0"
87+
"unplugin": "^1.5.0"
8888
},
8989
"devDependencies": {
90-
"@antfu/eslint-config": "^0.41.0",
91-
"@types/mime-types": "^2.1.1",
92-
"@types/node": "^20.5.7",
93-
"@vitest/coverage-v8": "^0.34.3",
90+
"@antfu/eslint-config": "1.0.0-beta.18",
91+
"@types/mime-types": "^2.1.2",
92+
"@types/node": "^20.8.0",
93+
"@vitest/coverage-v8": "^0.34.6",
9494
"css-loader": "^6.8.1",
9595
"esno": "^0.17.0",
9696
"fast-glob": "^3.3.1",
9797
"html-webpack-plugin": "^5.5.3",
9898
"mini-css-extract-plugin": "^2.7.6",
9999
"ts-loader": "^9.4.4",
100100
"tsup": "^7.2.0",
101-
"tsx": "^3.12.7",
101+
"tsx": "^3.13.0",
102102
"typescript": "^5.2.2",
103103
"vite": "^4.4.9",
104-
"vitest": "^0.34.3",
104+
"vitest": "^0.34.6",
105105
"webpack": "^5.88.2"
106106
}
107107
}

playground/vitejs/tsconfig.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
22
"compilerOptions": {
33
"target": "ESNext",
4+
"lib": ["ESNext", "DOM"],
45
"useDefineForClassFields": true,
56
"module": "ESNext",
6-
"lib": ["ESNext", "DOM"],
77
"moduleResolution": "Node",
8-
"strict": true,
9-
"sourceMap": true,
108
"resolveJsonModule": true,
9+
"sourceMap": true,
10+
"noEmit": true,
1111
"isolatedModules": true,
1212
"esModuleInterop": true,
13-
"noEmit": true,
13+
"strict": true,
14+
"noImplicitReturns": true,
1415
"noUnusedLocals": true,
1516
"noUnusedParameters": true,
16-
"noImplicitReturns": true,
1717
"skipLibCheck": true
1818
},
1919
"include": ["./../src", "main.ts"]

0 commit comments

Comments
 (0)