3.4.4 • Published 4 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
4 years ago
3.2.8
4 years ago
3.1.9
4 years ago
3.2.7
4 years ago
3.1.8
4 years ago
3.4.0
4 years ago
3.2.2
4 years ago
3.1.3
4 years ago
3.3.0
4 years ago
3.2.1
4 years ago
3.1.2
4 years ago
3.2.0
4 years ago
3.1.1
4 years ago
3.0.2
4 years ago
3.1.0
4 years ago
3.4.4
4 years ago
3.1.7
4 years ago
3.4.3
4 years ago
3.3.4
4 years ago
3.1.6
4 years ago
3.4.2
4 years ago
3.1.5
4 years ago
3.4.1
4 years ago
3.2.3
4 years ago
3.1.4
4 years ago
3.2.11
4 years ago
3.2.10
4 years ago
3.0.1
4 years ago
3.0.0
4 years ago
2.0.3
4 years ago
2.0.2
4 years ago
2.0.4
4 years ago
1.0.10
4 years ago
2.0.1
4 years ago
2.0.0
4 years ago
1.0.9
4 years ago
1.0.8
4 years ago
1.0.7
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago