Skip to content

Commit

Permalink
Merge pull request #5 from Applelo/dev
Browse files Browse the repository at this point in the history
Version 1.1.1
  • Loading branch information
Applelo committed Sep 30, 2023
2 parents 7c4f2d8 + f4d07f3 commit 54a9be4
Show file tree
Hide file tree
Showing 9 changed files with 517 additions and 816 deletions.
3 changes: 0 additions & 3 deletions .eslintrc

This file was deleted.

7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
This plugin adds preload links by getting output assets from the build tools you are using.

Supporting:
- Vite 3 and 4 (on build only)
- Vite 3 and 4 **(on build only)**
- Webpack 5 (with HTMLWebpackPlugin 5)
<!-- - Rspack -->

> [!NOTE]
> 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.
> [!NOTE]
> See the [migration guide](#migrate) for `vite-plugin-inject-preload` and `html-webpack-inject-preload` .
## Install
Expand Down Expand Up @@ -40,6 +42,9 @@ export default defineConfig({

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

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

<details>
Expand Down
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import antfu from '@antfu/eslint-config'

export default antfu()
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "unplugin-inject-preload",
"type": "module",
"version": "1.1.0",
"version": "1.1.1",
"packageManager": "pnpm@8.7.0",
"description": "Inject <link rel='preload'> for Webpack/ViteJS",
"license": "MIT",
Expand Down Expand Up @@ -84,24 +84,24 @@
},
"dependencies": {
"mime-types": "^2.1.35",
"unplugin": "^1.4.0"
"unplugin": "^1.5.0"
},
"devDependencies": {
"@antfu/eslint-config": "^0.41.0",
"@types/mime-types": "^2.1.1",
"@types/node": "^20.5.7",
"@vitest/coverage-v8": "^0.34.3",
"@antfu/eslint-config": "1.0.0-beta.18",
"@types/mime-types": "^2.1.2",
"@types/node": "^20.8.0",
"@vitest/coverage-v8": "^0.34.6",
"css-loader": "^6.8.1",
"esno": "^0.17.0",
"fast-glob": "^3.3.1",
"html-webpack-plugin": "^5.5.3",
"mini-css-extract-plugin": "^2.7.6",
"ts-loader": "^9.4.4",
"tsup": "^7.2.0",
"tsx": "^3.12.7",
"tsx": "^3.13.0",
"typescript": "^5.2.2",
"vite": "^4.4.9",
"vitest": "^0.34.3",
"vitest": "^0.34.6",
"webpack": "^5.88.2"
}
}
10 changes: 5 additions & 5 deletions playground/vitejs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"compilerOptions": {
"target": "ESNext",
"lib": ["ESNext", "DOM"],
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ESNext", "DOM"],
"moduleResolution": "Node",
"strict": true,
"sourceMap": true,
"resolveJsonModule": true,
"sourceMap": true,
"noEmit": true,
"isolatedModules": true,
"esModuleInterop": true,
"noEmit": true,
"strict": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"skipLibCheck": true
},
"include": ["./../src", "main.ts"]
Expand Down
Loading

0 comments on commit 54a9be4

Please sign in to comment.