3.4.4 • Published 3 years ago
unplugin-skypin v3.4.4
Options
packages
(Type: string[], Default:[]
): Declare the package imports that should be changed here. This is done manually opposed to automatically because Unplugin performs some low-level operations that can involve accessing dependencies that were never intended to be. Packages are able to prefetched through this method too, so there are extra performance benefits.minify
(Type: boolean, Default:true
): Whether to use Skypack's minified asset.replace
(Type: function(id: string) => boolean|string, Default:() => true
): Uses a returned string as the package id. Returning a boolean value simply toggles Skypack URL substitution.
Notes
- Nuxt is supposed to work but has not yet been tested.
- Webpack is not currently supported.
Usage
// vite.config.{m}js
import skypin from 'unplugin-skypin/vite'
import { defineConfig } from 'vite'
export default defineConfig({
plugins: [
skypin({
packages: [
/* imports to change here */
],
/* other options */
}),
],
})
// rollup.config.{m}js
import skypin from 'unplugin-skypin/rollup'
export default {
input: 'src/index.js',
output: {
dir: 'dist',
format: 'esm',
},
plugins: [
skypin({
packages: [
/* imports to change here */
],
/* other options */
}),
],
}
// webpack.config.{c}js
module.exports = {
/* ... */
plugins: [
require('unplugin-skypin/webpack').default({ /* options */ })
]
}
// nuxt.config.{m}js
export default {
buildModules: [
['unplugin-skypin/nuxt', { /* options */ }],
],
}
This module works for both Nuxt 2 and Nuxt Vite
// vue.config.{c}js
module.exports = {
configureWebpack: {
plugins: [
require('unplugin-skypin/webpack').default({ /* options */ }),
],
},
}
Development
pnpm i
Check the package.json
for the available scripts.
3.2.9
3 years ago
3.2.8
3 years ago
3.1.9
3 years ago
3.2.7
3 years ago
3.1.8
3 years ago
3.4.0
3 years ago
3.2.2
3 years ago
3.1.3
3 years ago
3.3.0
3 years ago
3.2.1
3 years ago
3.1.2
3 years ago
3.2.0
3 years ago
3.1.1
3 years ago
3.0.2
3 years ago
3.1.0
3 years ago
3.4.4
3 years ago
3.1.7
3 years ago
3.4.3
3 years ago
3.3.4
3 years ago
3.1.6
3 years ago
3.4.2
3 years ago
3.1.5
3 years ago
3.4.1
3 years ago
3.2.3
3 years ago
3.1.4
3 years ago
3.2.11
3 years ago
3.2.10
3 years ago
3.0.1
3 years ago
3.0.0
3 years ago
2.0.3
3 years ago
2.0.2
3 years ago
2.0.4
3 years ago
1.0.10
3 years ago
2.0.1
3 years ago
2.0.0
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago