JSPM

@constgen/neutrino-sourcemap

1.9.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 26
  • Score
    100M100P100Q42133F
  • 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

Features

  • JS source maps
  • CSS source maps
  • NodeJS optimized source maps automatically enabled
  • Chrome DevTools Workspace integration
  • Consider external dependencies sourcemaps for better debugging during development

Requirements

  • Node.js v10+
  • Neutrino v9
  • Webpack v4

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()
   ]
}