Package Exports
- neutrino-patch
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 (neutrino-patch) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Neutrino Patch
Adds simple methods to Neutrino to make managing configuration easier.
Install dependency
npm install --save neutrino-patch
Usage
const applyNeutrinoPatches = require('neutrino-patch');
const myMiddleware = () => (neutrino) => {
applyNeutrinoPatches(neutrino);
// adds extensions 'abc' and 'xyz' at end of list (lowest priority)
neutrino.addSupportedExtensions('abc', 'xyz');
// adds extensions 'yay' and 'woo' immediately before 'js' (higher priority)
// (or at end of list if 'js' is not found)
neutrino.addSupportedExtensionsBefore('js', 'yay', 'woo');
// add a preset to the babel compile stage
// (whether it has already been defined or not)
neutrino.tapAtEnd('compile', 'babel', (options) => {
options.presets.push(['@babel/some-preset-here', {}]);
return options;
});
};