Package Exports
- path-loader
- path-loader/lib/loaders/file-browser.js
- path-loader/lib/loaders/file.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (path-loader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
path-loader
Utility that provides a single API for loading the content of a path/URL. This module works in the browser and in io.js/Node.js. Right now this module supports the following loaders:
- http/https: This loader is used by default in the browser and will also be used in io.js/Node.js if the location being
loaded starts with
http:
orhttps:
- file: This loader is the used by default in io.js/Node.js and will throw an error in the browser (Due to how
locations are mapped to loaders, the only way to use the
file
loader in the browser is to attempt to load a file using the URL-version of its location. (Example:file:///Users/not-you/projects/path-loader/package.json
))
In the future, there will likely be a pluggable infrastructure for altering this list or overriding the loaders provided by the project but for now that is not an option.
Project Badges
Installation
path-loader is available for both Node.js and the browser. Installation instructions for each environment are below.
Browser
Installation for browser applications can be done via Bower or by downloading a standalone binary.
Using Bower
bower install path-loader --save
Standalone Binaries
The standalone binaries come in two flavors:
- path-loader.js: 112kb, full source and source maps
- path-loader-min.js: 16kb, minified, compressed and no sourcemap
Node.js
Installation for Node.js applications can be done via NPM.
npm install path-loader --save
Documentation
The documentation for this project can be found here: https://github.com/whitlockjc/path-loader/blob/master/docs/README.md