Socket
Book a DemoInstallSign in
Socket

unplugin-squoosh

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unplugin-squoosh

Register global imports on demand for Vite and Webpack

latest
Source
npmnpm
Version
0.0.0
Version published
Maintainers
1
Created
Source

unplugin-squoosh

NPM version

Starter template for unplugin.

Template Usage

To use this template, clone it down using:

npx degit byronogis/unplugin-squoosh my-unplugin

And do a global replace of unplugin-squoosh with your plugin name.

Then you can start developing your unplugin 🔥

To test your plugin, run: pnpm run dev To release a new version, run: pnpm run release

Install

npm i unplugin-squoosh
Vite
// vite.config.ts
import Starter from 'unplugin-squoosh/vite'

export default defineConfig({
  plugins: [
    Starter({ /* options */ }),
  ],
})

Example: playground/


Rollup
// rollup.config.js
import Starter from 'unplugin-squoosh/rollup'

export default {
  plugins: [
    Starter({ /* options */ }),
  ],
}


Webpack
// webpack.config.js
module.exports = {
  /* ... */
  plugins: [
    require('unplugin-squoosh/webpack')({ /* options */ })
  ]
}


Nuxt
// nuxt.config.js
export default {
  buildModules: [
    ['unplugin-squoosh/nuxt', { /* options */ }],
  ],
}

This module works for both Nuxt 2 and Nuxt Vite


Vue CLI
// vue.config.js
module.exports = {
  configureWebpack: {
    plugins: [
      require('unplugin-squoosh/webpack')({ /* options */ }),
    ],
  },
}


esbuild
// esbuild.config.js
import { build } from 'esbuild'
import Starter from 'unplugin-squoosh/esbuild'

build({
  plugins: [Starter()],
})


Keywords

unplugin

FAQs

Package last updated on 15 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts