Skip to content

Latest commit

 

History

History
39 lines (34 loc) · 830 Bytes

README.md

File metadata and controls

39 lines (34 loc) · 830 Bytes

Rollup plugin for compile sham-ui templates

yarn add -D rollup-plugin-sham-ui-templates

Usage

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'
        } )
    ]
};