Socket
Socket
Sign inDemoInstall

esbuild-plugin-solid

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-plugin-solid - npm Package Compare versions

Comparing version 0.0.2 to 0.1.0

19

dist/cjs/plugin.js

@@ -9,8 +9,6 @@ var __create = Object.create;

var __export = (target, all) => {
__markAsModule(target);
for (var name in all)
__defProp(target, name, {get: all[name], enumerable: true});
};
var __exportStar = (target, module2, desc) => {
__markAsModule(target);
var __reExport = (target, module2, desc) => {
if (module2 && typeof module2 === "object" || typeof module2 === "function") {

@@ -24,8 +22,7 @@ for (let key of __getOwnPropNames(module2))

var __toModule = (module2) => {
if (module2 && module2.__esModule)
return module2;
return __exportStar(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", {value: module2, enumerable: true}), module2);
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? {get: () => module2.default, enumerable: true} : {value: module2, enumerable: true})), module2);
};
// src/plugin.ts
__markAsModule(exports);
__export(exports, {

@@ -45,9 +42,9 @@ solidPlugin: () => solidPlugin

build.onLoad({filter: /\.(t|j)sx?$/}, async (args) => {
const source = await import_promises.readFile(args.path, {encoding: "utf-8"});
const source = await (0, import_promises.readFile)(args.path, {encoding: "utf-8"});
const isJsx = JSX_RE.test(source);
if (!isJsx)
return {contents: source, loader: "js"};
const {name, ext} = import_path.parse(args.path);
const {name, ext} = (0, import_path.parse)(args.path);
const filename = name + ext;
const {code} = await import_core.transformAsync(source, {
const {code} = await (0, import_core.transformAsync)(source, {
presets: [import_babel_preset_solid.default, import_preset_typescript.default],

@@ -62,1 +59,5 @@ filename,

}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
solidPlugin
});
{
"name": "esbuild-plugin-solid",
"version": "0.0.2",
"version": "0.1.0",
"description": "Solid's integration for ESBuild",

@@ -35,20 +35,20 @@ "main": "dist/cjs/plugin.js",

"peerDependencies": {
"esbuild": "^0.8.2",
"solid-js": "^0.23"
"esbuild": "^0.11",
"solid-js": ">= 0.26"
},
"dependencies": {
"@babel/core": "^7.12.10",
"@babel/preset-typescript": "^7.12.7",
"babel-preset-solid": "^0.23.5",
"esbuild": "^0.8.28",
"solid-js": "^0.23.5"
"@babel/core": "^7.13.15",
"@babel/preset-typescript": "^7.13.0",
"babel-preset-solid": "^0.26.0",
"esbuild": "^0.11.7",
"solid-js": "^0.26.0"
},
"devDependencies": {
"@skypack/package-check": "^0.2.2",
"@types/babel__core": "^7.1.12",
"@types/node": "^14.14.17",
"@types/babel__core": "^7.1.14",
"@types/node": "^14.14.37",
"del": "^6.0.0",
"serve": "^11.3.2",
"typescript": "^4.1.3"
"typescript": "^4.2.4"
}
}
# esbuild-plugin-solid
Plugin to compile solid jsx components with esbuild.
Plugin to compile [solid-js](https://github.com/ryansolid/solid) jsx components with [esbuild](https://esbuild.github.io/).
/!\ **Disclaimer** /!\
At the time of writing this, `esbuild` is not AS performant in term of dead code elimination as `rollup` is.
Rollup is the preferred way to bundle solid apps as it generally produce smaller code.
In my tests, a hello world :
* `rollup`: 5.95kb
* `esbuild`: 9.65kb
## Install

@@ -6,0 +17,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc