Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function fromSource(format) {
return {
input,
external,
output: {
file: outputFile(format),
format,
sourcemap: true,
},
plugins: [
nodeResolve({
extensions: ['.ts', '.tsx'],
module: true,
}),
typescriptPlugin({ typescript, tsconfig }),
invariantPlugin({
// Instead of completely stripping InvariantError messages in
// production, this option assigns a numeric code to the
// production version of each error (unique to the call/throw
// location), which makes it much easier to trace production
// errors back to the unminified code where they were thrown,
// where the full error string can be found. See #4519.
errorCodes: true,
}),
],
onwarn,
};
}
function fromSource(format) {
return {
input,
external,
output: {
file: outputFile(format),
format,
sourcemap: true,
},
plugins: [
nodeResolve({
extensions: ['.ts', '.tsx'],
module: true,
}),
typescriptPlugin({ typescript, tsconfig }),
invariantPlugin({
// Instead of completely stripping InvariantError messages in
// production, this option assigns a numeric code to the
// production version of each error (unique to the call/throw
// location), which makes it much easier to trace production
// errors back to the unminified code where they were thrown,
// where the full error string can be found. See #4519.
errorCodes: true,
}),
],
onwarn,
};
}