esbuild-plugin-solid
Advanced tools
Comparing version 0.4.1 to 0.4.2
@@ -9,10 +9,9 @@ var __create = Object.create; | ||
var __export = (target, all) => { | ||
__markAsModule(target); | ||
for (var name in all) | ||
__defProp(target, name, { get: all[name], enumerable: true }); | ||
}; | ||
var __reExport = (target, module2, desc) => { | ||
var __reExport = (target, module2, copyDefault, desc) => { | ||
if (module2 && typeof module2 === "object" || typeof module2 === "function") { | ||
for (let key of __getOwnPropNames(module2)) | ||
if (!__hasOwnProp.call(target, key) && key !== "default") | ||
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default")) | ||
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); | ||
@@ -22,15 +21,21 @@ } | ||
}; | ||
var __toModule = (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); | ||
var __toESM = (module2, isNodeMode) => { | ||
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); | ||
}; | ||
var __toCommonJS = /* @__PURE__ */ ((cache) => { | ||
return (module2, temp) => { | ||
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp); | ||
}; | ||
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0); | ||
// src/plugin.ts | ||
__export(exports, { | ||
var plugin_exports = {}; | ||
__export(plugin_exports, { | ||
solidPlugin: () => solidPlugin | ||
}); | ||
var import_path = __toModule(require("path")); | ||
var import_promises = __toModule(require("fs/promises")); | ||
var import_core = __toModule(require("@babel/core")); | ||
var import_babel_preset_solid = __toModule(require("babel-preset-solid")); | ||
var import_preset_typescript = __toModule(require("@babel/preset-typescript")); | ||
var import_path = require("path"); | ||
var import_promises = require("fs/promises"); | ||
var import_core = require("@babel/core"); | ||
var import_babel_preset_solid = __toESM(require("babel-preset-solid")); | ||
var import_preset_typescript = __toESM(require("@babel/preset-typescript")); | ||
function solidPlugin(options = {}) { | ||
@@ -54,2 +59,3 @@ return { | ||
} | ||
module.exports = __toCommonJS(plugin_exports); | ||
// Annotate the CommonJS export names for ESM import in node: | ||
@@ -56,0 +62,0 @@ 0 && (module.exports = { |
{ | ||
"name": "esbuild-plugin-solid", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "Solid's integration for ESBuild", | ||
@@ -33,15 +33,15 @@ "main": "dist/cjs/plugin.js", | ||
"dependencies": { | ||
"@babel/core": "^7.16.0", | ||
"@babel/preset-typescript": "^7.16.0", | ||
"babel-preset-solid": "^1.2.5" | ||
"@babel/core": "^7.16.5", | ||
"@babel/preset-typescript": "^7.16.5", | ||
"babel-preset-solid": "^1.2.6" | ||
}, | ||
"devDependencies": { | ||
"@skypack/package-check": "^0.2.2", | ||
"@types/babel__core": "^7.1.16", | ||
"@types/node": "^16.11.9", | ||
"@types/babel__core": "^7.1.17", | ||
"@types/node": "^17.0.4", | ||
"del": "^6.0.0", | ||
"esbuild": "^0.13.15", | ||
"esbuild": "^0.14.8", | ||
"serve": "^13.0.2", | ||
"solid-js": "^1.2.5", | ||
"typescript": "^4.5.2" | ||
"solid-js": "^1.2.6", | ||
"typescript": "^4.5.4" | ||
}, | ||
@@ -52,3 +52,4 @@ "scripts": { | ||
"check": "package-check" | ||
} | ||
}, | ||
"readme": "# esbuild-plugin-solid\n\nPlugin to compile [solid-js](https://github.com/ryansolid/solid) jsx components with [esbuild](https://esbuild.github.io/).\n\n/!\\ **Disclaimer** /!\\\n\nAt the time of writing this, `esbuild` is not AS performant in term of dead code elimination as `rollup` is.\n\nRollup is the preferred way to bundle solid apps as it generally produce smaller code.\n\nIn my tests, a hello world :\n\n* `rollup`: 5.95kb\n* `esbuild`: 9.65kb\n\n## Install\n\n`solid-js` and `esbuild` are peer dependencies\n\n```bash\n# For npm\nnpm install solid-js\nnpm install -D esbuild esbuild-plugin-solid\n\n# For pnpm\npnpm add solid-js\npnpm add -D esbuild esbuild-plugin-solid\n\n# For yarn\nyarn add solid-js\nyarn add -D esbuild esbuild-plugin-solid\n```\n\n## Usage\n\nOnce installed you need to configure `esbuild` to use this plugin.\n\n```js\nconst { build } = require('esbuild');\nconst { solidPlugin } = require('esbuild-plugin-solid');\n\nbuild({\n entryPoints: ['app.jsx'],\n bundle: true,\n outfile: 'out.js',\n plugins: [solidPlugin()],\n}).catch(() => process.exit(1))\n```\n\n## Configuration\n\nThere's no configuration as of now.\n\n## How it works\n\nThis is a 30 lines of code plugin. All it does is parse every import source code, check if JSX syntax is present using a dumb regex and transforming the file with `@babel/core`, `@babel/preset-typescript` and `babel-preset-solid`.\n\nOut of the box it checks every `/(t|j)sx?/` files and only transforms the one with JSX syntax in it.\n\n## Contributing\n\nThis package uses [pnpm](https://pnpm.js.org/) so you might want to install it if you don't have it.\n\nOnce done, you can just `pnpm build` & `pnpm test` to build & test your changes.\n\n`pnpm test` [will build](./scripts/test.js) a [dumb module](./tests/index.tsx) with the plugin and open a local web server serving the `tests` folder for you to check if things still work." | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8681
93
Updated@babel/core@^7.16.5
Updatedbabel-preset-solid@^1.2.6