JSPM

@constgen/neutrino-sourcemap

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q44451F
  • License GPL-3.0

Neutrino middleware to configure source maps in JS and CSS

Package Exports

  • @constgen/neutrino-sourcemap

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 (@constgen/neutrino-sourcemap) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@constgen/neutrino-sourcemap

npm npm

Neutrino middleware that automatically enables necessary source maps in development and production

Requirements

  • Node.js v10+
  • Neutrino v9

Installation

@constgen/neutrino-sourcemap can be installed from NPM. You should install it to "dependencies" (--save) or "devDependncies" (--save-dev) depending on your goal.

npm install --save @constgen/neutrino-sourcemap

Usage

In preset

Require this package and plug it into Neutrino. The following shows how you can pass an options object to the middleware, showing the defaults:

let sourcemap = require('@constgen/neutrino-sourcemap')

neutrino.use(sourcemap({
   prod: false, // enable source maps in production
   dev: true // enable source maps in development
}))

In neutrinorc

The middleware also may be used together with another presets in Neutrino rc-file, e.g.:

.neutrinorc.js

let sourcemap = require('@constgen/neutrino-sourcemap')

module.exports = {
   use: [
      sourcemap()
   ]
}