@react-pug/esbuild-plugin-react-pug
v0.1.18
Published
esbuild plugin for transforming `pug\`...\`` tagged template literals in React code.
Readme
@react-pug/esbuild-plugin-react-pug
esbuild plugin for transforming pug\...`` tagged template literals in React code.
Install
npm i -D @react-pug/esbuild-plugin-react-pug esbuildUsage
import { build } from 'esbuild'
import { reactPugEsbuildPlugin } from '@react-pug/esbuild-plugin-react-pug'
await build({
entryPoints: ['src/index.tsx'],
bundle: true,
plugins: [reactPugEsbuildPlugin()],
sourcemap: true
})Options
tagFunction: tagged template function name, defaultpuginclude: file filter regexpexclude: file exclusion regexprequirePugImport: boolean, defaultfalseclassShorthandProperty:auto | className | class | styleNameclassShorthandMerge:auto | concatenate | classnamesstartupjsCssxjs:never | auto | forcecomponentPathFromUppercaseClassShorthand: boolean, defaulttrue
Used pug import bindings are removed from transformed output automatically.
Exports
reactPugEsbuildPlugin(...)transformReactPugSourceForEsbuild(...)- diagnostic/range remapping helpers
Published output is in dist/.
