Registry /
web-framework / babel-preset-dlight-server
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
default
✓ module.exports = require('babel-preset-dlight-server')
✗ import preset from 'babel-preset-dlight-server'
Presets are typically used in config files; CommonJS require is standard. For ESM configs, use dynamic import or require with createRequire.
name
✓ In .babelrc: { "presets": ["babel-preset-dlight-server"] }
✗ import { babelPresetDlightServer } from 'babel-preset-dlight-server'
Preset is referenced by string name, not imported as a symbol.
type
✓ import type { ConfigFunction } from '@babel/core'; const preset: ConfigFunction = require('babel-preset-dlight-server')
✗ const { default: preset } = require('babel-preset-dlight-server')
TypeScript types are provided; the preset returns a ConfigFunction.
Shows how to use the preset in a Babel config file, both with and without options.
// babel.config.js
module.exports = {
presets: ['babel-preset-dlight-server'],
};
// With options:
module.exports = {
presets: [
['babel-preset-dlight-server', { someOption: true }]
],
};
Errors
Common errors & fixes
Error: Plugin/Preset files are not allowed to export objects, only functions.
Using an older version of Babel that expects function return.
fixUpgrade @babel/core to version that supports object presets, or wrap preset in a function.
Module not found: Can't resolve 'babel-preset-dlight-server' in '/path/to/project'
Package not installed or missing from node_modules.
fixInstall via npm install babel-preset-dlight-server
Audit
Dependencies
@babel/coreoptionalRequired as peer dependency for Babel presets.