[フレーム]
Skip to main content
An OutSystems Company →
This is documentation for Stencil v3, which is no longer actively maintained.
For up-to-date documentation, see the latest version (v4.40).
Version: v3

Plugins

Stencil plugins

By default, Stencil does not come with Sass or PostCSS support. However, either can be added using the plugins array.

import{Config}from'@stencil/core';
import{ sass }from'@stencil/sass';

exportconst config:Config={
plugins:[
sass()
]
};

Rollup plugins

The rollupPlugins config can be used to add your own Rollup plugins. Under the hood, stencil ships with some built-in plugins including node-resolve and commonjs, since the execution order of rollup plugins is important, stencil provides an API to inject custom plugin before node-resolve and after commonjs transform:

exportconst config ={
rollupPlugins:{
before:[
// Plugins injected before rollupNodeResolve()
resolvePlugin()
],
after:[
// Plugins injected after commonjs()
nodePolyfills()
]
}
}

Node Polyfills

See the Node Polyfills in Module bundling for other examples.

AltStyle によって変換されたページ (->オリジナル) /