Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Mar 12, 2024 via pnpm

loader-runner 4.3.0

Runs (webpack) loaders
Package summary
Share
0
issues
1
license
1
MIT
Package created
3 Jan 2016
Version published
12 Apr 2022
Maintainers
2
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
loader-runner@4.3.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of loader-runner 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does loader-runner do?

Loader-runner is a very useful package within the webpack suite of tools. It operates by running loaders, which are specialized functions designed to transform and preprocess files. This tool is particularly helpful for tasks involving bundling files, loading CSS or converting ES6 to ES5 javascript code, among others.

How do you use loader-runner?

Using loader-runner involves importing the runLoaders method from the "loader-runner" package into your Javascript file. Once imported, you will define various parameters such as the resource, loaders, context, processResource, and readResource within the runLoaders configurational object.

Here is a code sample illustrating the correct usage:

import { runLoaders } from "loader-runner";

runLoaders({
	resource: "/abs/path/to/file.txt?query",

	loaders: ["/abs/path/to/loader.js?query"],

	context: { minimize: true },

	processResource: (loaderContext, resourcePath, callback) => { ... },

	readResource: fs.readFile.bind(fs)
}, function(err, result) {
	// handle errors and results here
})

This configures loader-runner to process file.txt, using the loader.js loader. The context for this setup is specified as { minimize: true }, and there are also specifications for processResource and readResource functions, governing how the resource is processed and read, respectively.

Where are the loader-runner docs?

The primary documentation for loader-runner appears to be contained in the README file of the GitHub repository, which can be found at https://github.com/webpack/loader-runner. It's currently noted in the README that more documentation is coming soon, so it might be worth checking back periodically for more detailed and updated instructions.