
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
nodent-loader
Advanced tools
A loader for webpack to transform ES7 async/await statements using nodent
nodent-loader will transform ES7 async/await statements used in source files loaded by webpack using nodent to produce code that is suitable for consumption by other loaders (e.g. babel) or for webpack output.
In your webpack.config.js:
{
module: {
loaders: [
{
test: /\.js$/,
loader: 'nodent-loader',
exclude: /(node_modules)/
}
]
}
}
A query can be specified which will pass the options to the nodent compiler.
The can be defined by following the format (specified by loader-utils):
null -> {}
? -> {}
?flag -> { flag: true }
?+flag -> { flag: true }
?-flag -> { flag: false }
?xyz=test -> { xyz: "test" }
?xyz[]=a -> { xyz: ["a"] }
?flag1&flag2 -> { flag1: true, flag2: true }
?+flag1,-flag2 -> { flag1: true, flag2: false }
?xyz[]=a,xyz[]=b -> { xyz: ["a", "b"] }
?a%2C%26b=c%2C%26d -> { "a,&b": "c,&d" }
?{json:5,data:{a:1}} -> { json: 5, data: { a: 1 } }
{
module: {
loaders: [
{
test: /\.js$/,
loader: 'nodent-loader?+promises,+wrapAwait',
exclude: /(node_modules)/,
}
]
}
}
or by passing an object to the query
property
{
module: {
loaders: [
{
test: /\.js$/,
loader: 'nodent-loader',
exclude: /(node_modules)/,
query: {
promises: true,
wrapAwait: true
}
}
]
}
}
FAQs
A loader for webpack to transform ES7 async/await statements using nodent
The npm package nodent-loader receives a total of 4 weekly downloads. As such, nodent-loader popularity was classified as not popular.
We found that nodent-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.