0.1.1 • Published 4 years ago

@maa/monkey-source-maps v0.1.1

Weekly downloads
4
License
MIT
Repository
-
Last release
4 years ago

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;
	}
});