Socket
Book a DemoInstallSign in
Socket

@kalxjs/compiler-plugin

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kalxjs/compiler-plugin

Webpack and Rollup plugin for KalxJS single-file components

1.2.35
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

@kalxjs/compiler-plugin

Webpack and Rollup plugin for KalxJS single-file components.

Installation

npm install --save-dev @kalxjs/compiler-plugin

Usage with Webpack

// webpack.config.js
const { WebpackPlugin } = require('@kalxjs/compiler-plugin');

module.exports = {
  // ...
  module: {
    rules: [
      {
        test: /\.klx$/,
        use: [
          'babel-loader',
          {
            loader: require.resolve('@kalxjs/compiler-plugin/loader'),
            options: {
              // compiler options
            }
          }
        ]
      }
    ]
  },
  plugins: [
    new WebpackPlugin({
      // plugin options
    })
  ]
};

Usage with Rollup

// rollup.config.js
import { rollupPlugin } from '@kalxjs/compiler-plugin';

export default {
  // ...
  plugins: [
    rollupPlugin({
      // plugin options
    })
  ]
};

Options

  • sourceMap - Generate source maps (default: false)
  • hot - Enable hot module replacement (default: false)
  • optimize - Enable optimizations (default: process.env.NODE_ENV === 'production')

Features

  • Compiles KalxJS single-file components (.klx files)
  • Supports both Webpack and Rollup
  • Integrates with Babel for transpilation
  • Supports source maps
  • Supports hot module replacement

License

MIT

Keywords

kalxjs

FAQs

Package last updated on 17 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.