0.1.1 • Published 1 year ago

unplugin-stencil v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Stencil Unplugin

NPM version

An unplugin that wraps the Stencil compiler to be used within Astro, Esbuild, Nuxt, Rollup, rspack, Vite and Webpack etc. environments.

Install

To install this unplugin, run:

npm i unplugin-stencil
// vite.config.ts
import stencil from 'unplugin-stencil/vite'

export default defineConfig({
  plugins: [
    stencil({ /* Stencil configuration overwrites */ }),
  ],
})

// rollup.config.js
import Starter from 'unplugin-stencil/rollup'

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

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

// nuxt.config.js
export default defineNuxtConfig({
  modules: [
    ['unplugin-stencil/nuxt', { /* options */ }],
  ],
})

This module works for both Nuxt 2 and Nuxt Vite

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

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

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

0.1.1

1 year ago

0.1.0

1 year ago