![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
metro-config
Advanced tools
The metro-config package provides utilities to configure and customize Metro, which is a JavaScript bundler for React Native. It allows developers to modify the default configuration of Metro to suit their project's specific needs.
Default Configuration
Retrieve the default Metro configuration which can be used as a starting point for customizing the bundler settings.
const { getDefaultConfig } = require('metro-config');
async function getConfig() {
const config = await getDefaultConfig(__dirname);
return config;
}
Merge Configurations
Combine the default Metro configuration with custom settings to create a new configuration object.
const { mergeConfig } = require('metro-config');
const defaultConfig = await getDefaultConfig(__dirname);
const customConfig = {
resolver: {
sourceExts: ['jsx', 'js', 'ts', 'tsx'],
},
};
const mergedConfig = mergeConfig(defaultConfig, customConfig);
Load Config
Load the Metro configuration from a project, which can include the default settings, settings from a metro.config.js file, or settings from package.json.
const { loadConfig } = require('metro-config');
async function getConfig() {
const config = await loadConfig();
return config;
}
Webpack is a powerful module bundler for JavaScript applications. It offers a rich plugin interface and is highly configurable, similar to Metro, but it is more commonly used in web development rather than React Native.
Rollup is another module bundler that focuses on producing efficient bundles using a technique called 'tree shaking' to eliminate unused code. It is simpler and more lightweight compared to Metro, and it is also more geared towards web development.
Parcel is a web application bundler that offers a zero-configuration experience. It is different from Metro in that it is optimized for web development and provides out-of-the-box support for many web assets without the need for additional plugins or configuration.
Browserify is a tool for bundling JavaScript files for usage in the browser. It allows you to use require('modules') in the browser by bundling up all of your dependencies. It is less feature-rich compared to Metro and is primarily focused on bundling for the web rather than React Native.
🚇 Config resolver and transformer for Metro.
FAQs
🚇 Config parser for Metro.
The npm package metro-config receives a total of 1,341,217 weekly downloads. As such, metro-config popularity was classified as popular.
We found that metro-config demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.