generated from unplugin/unplugin-starter
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change plugin layout to support jsr repo
- Loading branch information
Showing
9 changed files
with
105 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "@applelo/unplugin-inject-preload", | ||
"version": "2.0.2", | ||
"exports": { | ||
".": "./src/index.ts", | ||
"./vite": "./src/vite.ts", | ||
"./webpack": "./src/webpack.ts", | ||
"./rspack": "./src/rspack.ts" | ||
}, | ||
"exclude": [ | ||
"test", | ||
"playground", | ||
"pnpm-lock.yaml", | ||
"pnpm-workspace.yaml", | ||
".npmrc", | ||
"eslint.config.js", | ||
"tsup.config.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,26 @@ | ||
import { createRspackPlugin } from 'unplugin' | ||
import { unpluginFactory } from '.' | ||
/** | ||
* This entry file is for Rspack plugin. | ||
* | ||
* @module | ||
*/ | ||
|
||
export default createRspackPlugin(unpluginFactory) | ||
import unplugin from './index' | ||
|
||
/** | ||
* Rspack plugin | ||
* | ||
* @example | ||
* ```ts | ||
* // rspack.config.js | ||
* const HtmlWebpackPlugin = require('html-webpack-plugin') | ||
* const UnpluginInjectPreload = require('unplugin-inject-preload/rspack') | ||
* | ||
* module.exports = { | ||
* plugins: [ | ||
* HtmlWebpackPlugin({ your_options }), | ||
* UnpluginInjectPreload({ your_options }), | ||
* ] | ||
* } | ||
* ``` | ||
*/ | ||
export default unplugin.rspack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,24 @@ | ||
import { createVitePlugin } from 'unplugin' | ||
import { unpluginFactory } from '.' | ||
/** | ||
* This entry file is for Vite plugin. | ||
* | ||
* @module | ||
*/ | ||
|
||
export default createVitePlugin(unpluginFactory) | ||
import unplugin from './index' | ||
|
||
/** | ||
* Vite plugin | ||
* | ||
* @example | ||
* ```ts | ||
* // vite.config.ts | ||
* import UnpluginInjectPreload from 'unplugin-inject-preload/vite' | ||
* | ||
* export default defineConfig({ | ||
* plugins: [ | ||
* UnpluginInjectPreload({ your_options }), | ||
* ], | ||
* }) | ||
* ``` | ||
*/ | ||
export default unplugin.vite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,26 @@ | ||
import { createWebpackPlugin } from 'unplugin' | ||
import { unpluginFactory } from '.' | ||
/** | ||
* This entry file is for Webpack plugin. | ||
* | ||
* @module | ||
*/ | ||
|
||
export default createWebpackPlugin(unpluginFactory) | ||
import unplugin from './index' | ||
|
||
/** | ||
* Webpack plugin | ||
* | ||
* @example | ||
*```ts | ||
* // webpack.config.js | ||
* const HtmlWebpackPlugin = require('html-webpack-plugin') | ||
* const UnpluginInjectPreload = require('unplugin-inject-preload/webpack') | ||
* | ||
* module.exports = { | ||
* plugins: [ | ||
* HtmlWebpackPlugin({ your_options }), | ||
* UnpluginInjectPreload({ your_options }), | ||
* ] | ||
* } | ||
*``` | ||
*/ | ||
export default unplugin.webpack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import type { Options } from 'tsup' | ||
import { defineConfig } from 'tsup' | ||
|
||
export default <Options>{ | ||
entryPoints: [ | ||
'src/*.ts', | ||
], | ||
clean: true, | ||
export default defineConfig({ | ||
entry: ['./src/*.ts'], | ||
format: ['cjs', 'esm'], | ||
target: 'node16.14', | ||
splitting: true, | ||
cjsInterop: true, | ||
clean: true, | ||
dts: true, | ||
onSuccess: 'npm run build:fix', | ||
} | ||
}) |