@maa/monkey-source-maps
v0.1.1
Published
Generate source maps during production build in your project
Downloads
17
Readme
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;
}
});