1.0.0 • Published 5 years ago

razzle-plugin-disable-sourcemaps-production v1.0.0

Weekly downloads
72
License
MIT
Repository
github
Last release
5 years ago

Razzle Plugin Disable Sourcemaps Production

This package contains a plugin to disable Sourcemaps CSS and JS on Production build with Razzle.

Usage in Razzle Projects

  • Install razzle-plugin-disable-sourcemaps-production

    if you're using yarn

    yarn add razzle-plugin-disable-sourcemaps-production --dev

    if you're using npm

    npm install razzle-plugin-disable-sourcemaps-production --save-dev
  • create a razzle.config.js file in root directory of project (next to the package.json) and put this content inside it

    // razzle.config.js
    module.exports = {
      plugins: [
        'disable-sourcemaps-production'
      ],
    };

Options

  • devtool (default: cheap-module-eval-source-map) You can change the devtool on Development mode with the option devtool, but will be disable on Production:

    // razzle.config.js
    module.exports = {
      plugins: [
        {
          name: 'disable-sourcemaps-production',
          options: {
            devtool: 'eval'
          }
        }
      ],
    };

See Webpack Devtool Docs for more information.