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

1.0.1 • Public • Published

GSolid Plugin for ESBuild

This plugin helps you bundling files using ESBuild. This plugin does not handle Gjs detail for you, you can use esbuild-gjs to handle that.

import * as esbuild from "esbuild";
import GjsPlugin from "esbuild-gjs";
import GSolidPlugin from "esbuild-plugin-gsolid";

await esbuild.build({
  entryPoints: ["index.tsx"],
  target: "firefox68", // Spider Monkey 68
  format: "esm",
  bundle: true,
  outfile: "dest/index.js",
  plugins: [GjsPlugin({}), GSolidPlugin()],
  treeShaking: true,
});

Installation

You must install babel-preset-solid together to use this plugin.

# NPM:
npm i --save-dev esbuild-plugin-gsolid babel-preset-solid

# PNPM:
pnpm -D esbuild-plugin-gsolid babel-preset-solid

# YARN
yarn add -D esbuild-plugin-gsolid babel-preset-solid

# BUN
bun add -D esbuild-plugin-gsolid babel-preset-solid

What the plugin do

  • Load tsx/jsx files and transform them into JavaScript
  • Resolve solid-js package as "solid-js-file" namespace, load files and inject gsolid/web-ponyfill into them
  • Assume your code files are UTF-8 encoding

LICENSE

SPDX: Apache-2.0

/esbuild-plugin-gsolid/

    Package Sidebar

    Install

    npm i esbuild-plugin-gsolid

    Weekly Downloads

    0

    Version

    1.0.1

    License

    Apache-2.0

    Unpacked Size

    19.5 kB

    Total Files

    6

    Last publish

    Collaborators

    • rubiconw