JSPM

neutrino-middleware-source-map

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q13567F
  • License MIT

Neutrino middleware for supporting sourceMap

Package Exports

  • neutrino-middleware-source-map

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-middleware-source-map) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

neutrino-middleware-source-map

NPM version NPM downloads CircleCI

neutrino-middleware-source-map is Neutrino middleware for supporting sourceMap

fork from poi

Requirements

  • Node.js v6.10+
  • Yarn or npm client
  • Neutrino v6

Install

# yarn
$ yarn add neutrino-middleware-source-map
# npm
$ npm install --save neutrino-middleware-source-map

Usage

neutrino-middleware-source-map can be consumed from the Neutrino API, middleware, or presets. Require this package and plug it into Neutrino:

// Using function middleware format
const sourceMap = require('neutrino-middleware-source-map')

// Use with default options
neutrino.use(sourceMap)

// Usage showing overriding minification options
neutrino.use(sourceMap, {
  sourceMap: true
})
// Using object or array middleware format

// Use with default options
module.exports = {
  use: ['neutrino-middleware-source-map']
}

// Usage showing overriding minification options
module.exports = {
  use: [
    ['neutrino-middleware-source-map', {
      sourceMap: true
    }]
  ]
}

Options

sourceMap

Type: string boolean

Default: true

By default, it use eval-source-map in development mode, use inline-source-map in test mode, and use source-map in production mode.

When give a string value, will use it in all modes.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

neutrino-middleware-source-map © zcong1993, Released under the MIT License.
Authored and maintained by zcong1993 with help from contributors (list).

github.com/zcong1993 · GitHub @zcong1993