npm.io
0.1.1 • Published 6 years ago

@maa/monkey-source-maps

Licence
MIT
Version
0.1.1
Deps
0
Size
3 kB
Vulns
0
Weekly
0

Source Maps

Generate source maps during production build in your project

Installation

npm install --save @maa/monkey-source-maps

or

yarn add @maa/monkey-source-maps

Usage with environment variables

Create a next.config.js

// next.config.js
const withSourceMaps = require('@maa/monkey-source-maps');
module.exports = withSourceMaps({
	webpack(config, options) {
		return config;
	}
});

Then you can run a regular build command and source maps will be outputted for the bundles

npm run build
Configuring plugin

By default devtool is source-map. If you want use different devtool type, you can pass it with options.

// next.config.js
const withSourceMaps = require('@maa/monkey-source-maps')({
	devtool: 'hidden-source-map'
});

module.exports = withSourceMaps({
	webpack(config, options) {
		return config;
	}
});