
Security News
Vite+ Joins the Push to Consolidate JavaScript Tooling
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
load-esm-config
Advanced tools
Load configuration files written in TypeScript and JavaScript
Tools like vite
have popularized the idea of code as configuration within the JavaScript / TypeScript ecosystem. Some advantages of using TypeScript for are:
This project is solely focused on automating the process of loading these configuration files. The configuration is searched from the provided cwd
and loaded automatically.
.config
folder)pnpm add load-esm-config
import { loadEsmConfig } from 'load-esm-config';
// Load the configuration file and the absolute path to the config file.
const result = loadEsmConfig({ name: 'something' });
// `result` is either undefined or an object with the following properties:
if (result) {
const { config, path } = result;
}
By default it supports these extensions: ['.ts', '.mts', '.cts', '.js', '.mjs', '.cjs']
. It is also possible to limit support for extensions by passing the extensions
property.
By default ./
(current) and .config/
folders will be searched for matching configuration files. In the example above both something.config.ts
and .config/something.config.mjs
are valid configuration locations. This optionality should help remove configuration file overload in top level Further configuration folders can be added via the dirs
property.
loadEsmConfig
|
|
|
|
This package is adapted from vite. The work the vite developers are doing is outstanding and this package would not exist without their efforts.
FAQs
Load configuration files written in TypeScript and JavaScript
The npm package load-esm-config receives a total of 0 weekly downloads. As such, load-esm-config popularity was classified as not popular.
We found that load-esm-config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
Security News
Ruby Central’s incident report on the RubyGems.org access dispute sparks backlash from former maintainers and renewed debate over project governance.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.