0
votes

Tried following guides from

But didn't get it working on deployed app, I'm using

rails 5.2.2

webpacker 3.5.5

What's the proper way to enable source maps so I can debug js packs code on staging/production environment?

1

1 Answers

1
votes

I believe you should able to specify the source map strategy using the Webpacker config API as follows:

// config/webpack/production.js

const environment = require('./environment')

environment.config.merge({ devtool: 'source-map' }) // or whatever type you want

module.exports = environment.toWebpackConfig()