Giter Site home page Giter Site logo

sentry_block's People

Watchers

 avatar

sentry_block's Issues

Doesn't work with typescript

Hey Kevin,

This is in relation to this:

https://community.airtable.com/t/blocks-cli-2-0-0-is-here/47253/10

If you prefer to reopen the topic so I can post there, let me know.

Your sentry example does work and does report errors but the source maps don't work with typescript. I tried to change tsconfig.json to both sourceMaps and inlineSourceMaps and neither work.

See here for what's going on in sentry.

Here's bundler.js:

const createBundler = require("@airtable/blocks-webpack-bundler").default;
const SentryPlugin = require("@sentry/webpack-plugin");
const SentryConfig = require("./sentryConfig");

function createConfig(baseConfig) {
	baseConfig.module.rules.push({
		test: /\.tsx?$/,
		exclude: [/node_modules/],
		loader: "babel-loader",
		options: {
			babelrc: false,
			configFile: false,
			presets: [
				require.resolve("@babel/preset-env"),
				require.resolve("@babel/preset-react"),
				require.resolve("@babel/preset-typescript"),
			],
			plugins: [
				["@babel/plugin-proposal-decorators", { legacy: true }],
				["@babel/plugin-proposal-class-properties", { loose: false }],
				// In contrast to MobX 4/5, "loose" must be false!    ^
			],
		},
	});

	if (baseConfig.mode === "production") {
		baseConfig.devtool = "source-map";
		baseConfig.plugins = (baseConfig.plugins || []).concat([
			new SentryPlugin({
				release: SentryConfig.RELEASE_VERSION,
				include: "./.tmp/dist",
			}),
		]);
	}

	return baseConfig;
}

exports.default = () => {
	return createBundler(createConfig);
};

Thanks,
Ronen

Doesn't work with typescript

Hey Kevin,

If you prefer to reopen the community topic so I can post there, let me know.

Your sentry example does work and does report errors but the source maps don't work with typescript. I tried to change tsconfig.json to both sourceMaps and inlineSourceMaps and neither work.

See here for what's going on in sentry.

Here's bundler.js:

const createBundler = require("@airtable/blocks-webpack-bundler").default;
const SentryPlugin = require("@sentry/webpack-plugin");
const SentryConfig = require("./sentryConfig");

function createConfig(baseConfig) {
	baseConfig.module.rules.push({
		test: /\.tsx?$/,
		exclude: [/node_modules/],
		loader: "babel-loader",
		options: {
			babelrc: false,
			configFile: false,
			presets: [
				require.resolve("@babel/preset-env"),
				require.resolve("@babel/preset-react"),
				require.resolve("@babel/preset-typescript"),
			],
			plugins: [
				["@babel/plugin-proposal-decorators", { legacy: true }],
				["@babel/plugin-proposal-class-properties", { loose: false }],
				// In contrast to MobX 4/5, "loose" must be false!    ^
			],
		},
	});

	if (baseConfig.mode === "production") {
		baseConfig.devtool = "source-map";
		baseConfig.plugins = (baseConfig.plugins || []).concat([
			new SentryPlugin({
				release: SentryConfig.RELEASE_VERSION,
				include: "./.tmp/dist",
			}),
		]);
	}

	return baseConfig;
}

exports.default = () => {
	return createBundler(createConfig);
};

Thanks,
Ronen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.