Registry / web-framework / rollup-plugin-sham-ui-templates

rollup-plugin-sham-ui-templates

JSON →
library1.1.0jsnpmunverified

Rollup plugin that compiles sham-ui template files (.sht, .sfc) during bundling. Version 1.1.0 is current. Supports two file types: standard templates and single-file components. Requires @rollup/plugin-babel for transformation. Minimal configuration; designed specifically for sham-ui projects.

npm install rollup-plugin-sham-ui-templates
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-SHAM
R
rollup-plugin-sham-ui-templates
web-frameworkjavascriptv1.1.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import shamUICompiler from 'rollup-plugin-sham-ui-templates'
const shamUICompiler = require('rollup-plugin-sham-ui-templates')
Package is ESM-only; CJS require will fail.
default
import shamUICompiler from 'rollup-plugin-sham-ui-templates'
import { shamUICompiler } from 'rollup-plugin-sham-ui-templates'
Export is default, not named.
call expression
shamUICompiler({ extensions: ['.sht'] })
new shamUICompiler({ extensions: ['.sht'] })
Plugin is invoked as a function, not with 'new'.

Shows Rollup configuration using two shamUICompiler instances for .sht and .sfc files, with Babel processing.

// rollup.config.js import shamUICompiler from 'rollup-plugin-sham-ui-templates'; import { babel } from '@rollup/plugin-babel'; export default { input: 'src/main.js', output: { file: 'dist/bundle.js', format: 'iife', sourcemap: true }, plugins: [ shamUICompiler({ extensions: ['.sht'] }), shamUICompiler({ extensions: ['.sfc'], compilerOptions: { asModule: false, asSingleFileComponent: true } }), babel({ extensions: ['.js', '.sht', '.sfc'], exclude: ['node_modules/**'], babelHelpers: 'bundled' }) ] };
Debug
Known issues
gotchaBoth .sht and .sfc must be added to Babel extensions for transformation.
fix
Include extensions: ['.js', '.sht', '.sfc'] in @rollup/plugin-babel config.
affects: >=1.0.0
gotchaPlugin is ESM-only; CommonJS require will fail with 'ERR_REQUIRE_ESM'.
fix
Use import syntax or switch to an ESM-compatible environment.
affects: >=1.0.0
gotchaDefault export is a function, not a class; using 'new' will cause runtime error.
fix
Call shamUICompiler(...) without 'new'.
affects: >=1.0.0
deprecatedNo deprecated versions known.
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module not supported.
Using CommonJS require on an ESM-only package.
fix
Replace require() with import or set type: 'module' in package.json.
TypeError: shamUICompiler is not a constructor
Using 'new' on a function export that is not a class.
fix
Remove 'new' and call shamUICompiler(...) directly.
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies
@rollup/plugin-babelrequiredBabel must be used to transform compiled templates
Agent activity
13 hits · last 30 days
node
10
Amazon
1
Resources
rollup-plugin-sham-ui-templates — npm install rollup-plugin-sham-ui-templates · libregistry