1.0.0 • Published 10 months ago

esbuild-plugin-gsolid v1.0.0

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
10 months ago

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

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

LICENSE

SPDX: Apache-2.0

1.0.0

10 months ago