hexo-esbuild
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

hexo-esbuild

Transform JavaScript, CSS, TypeScript, and JSX files via esbuild Transformer API.

Install

NPM Version node-lts NPM License NPM Downloads NPM Downloads Libraries.io dependency status for latest release

pnpm add hexo-esbuild

# npm i hexo-esbuild

Configuration

Default Configuration

Defined in src/default_config.ts

hexo_esbuild:
  enable: true # boolean. enable hexo-esbuild.
  js: # the filter option for js.
    enable: true # boolean. enable js filter.
    after_render: "js" # string. hexo filter hook. support https://hexo.io/api/filter#after-render
    priority: 999 # number. hexo filter priority. Lower priority means that it will be executed first
    exclude: # Array<string>. exclude files to be transformed. which will be passed to `micromatch`.
      - "**.min.js"
    esbuildTransformOptions: # the TransformOptions of esbuild. https://esbuild.github.io/api/#transform
      loader: "js"
      minify: true
      logLevel: "warning"
  css:
    enable: true
    after_render: "css"
    priority: 999
    exclude:
      - "**.min.css"
    esbuildTransformOptions:
      loader: "css"
      minify: true
      logLevel: "warning"
# add more configuration if you want.

Package Sidebar

Install

npm i hexo-esbuild

Weekly Downloads

7

Version

2.0.0

License

MPL-2.0

Unpacked Size

26.4 kB

Total Files

12

Last publish

Collaborators

  • uiolee