kevinwilde-at / sentry_block Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT No Attribution
License: MIT No Attribution
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.