Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install bugsnag and generate source map in razzle.config.js file #884

Closed
albertobebz opened this issue Jan 14, 2019 · 2 comments
Closed
Labels

Comments

@albertobebz
Copy link

I'm quite new to Razzle, but I'd like to install bugsnag for error tracking in my app.
I was able to install bugsnag, but I'm experiencing issue to produce the source map file necessary to locate the error in my app.

my module.export in razzle.config.js looks like so:

module.exports = {
	modify(config, { target, dev }, webpack) {
		const newConfig = isHeroku
			? razzleHeroku(config, { target, dev }, webpack)
			: config

		newConfig.node = {
			fs: 'empty',
			module: 'empty',
			console: true
		}

		newConfig.devtool = dev ? 'cheap-module-source-map' : 'source-map'

		if (isHeroku && !dev) {
			newConfig.plugins = [
				new BugsnagSourceMapUploaderPlugin({
					apiKey: 'MY-API-KEY-HERE',
					appVersion: '1.2.3'
				}),
				...newConfig.plugins
			]
		}

		if (target === 'web') {
			newConfig.plugins.push(
				new ReactLoadablePlugin({
					filename: './build/react-loadable.json'
				})
			)
		}

		return newConfig
	}
}

any advice on how to produce a source map file using Razzle?

thanks in advance

@nimaa77
Copy link
Collaborator

nimaa77 commented Mar 17, 2020

Closed due to inactivity. Holler if this is a mistake, and we'll re-open it.

@nimaa77 nimaa77 closed this as completed Mar 17, 2020
@vivex
Copy link

vivex commented Jun 17, 2020

I am also looking for the same. from razzle.config.js i am returning
appConfig.devtool ='source-map'; but its not generating sourcemap on razzle build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants