Skip to content

Commit

Permalink
Disable source map support
Browse files Browse the repository at this point in the history
It bloats the Lambda deployment bundles, and it isn't working.

This reverts commits afb20b6
and 2c97c7f.
  • Loading branch information
lpsinger committed Dec 15, 2024
1 parent 295af31 commit 4ea4afa
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 26 deletions.
1 change: 0 additions & 1 deletion app.arc
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ dedicatedMasterType t3.small.search

@plugins
plugin-remix
enable-source-maps # Enable Node.js source map support.
sandbox-oidc-idp # Sandbox identity provider
lambda-cognito-permissions # Grant the Lambda function access to Cognito to run the credential vending machine.
static-bucket-permissions # Functions may only write to the /generated directory in the static bucket.
Expand Down
1 change: 0 additions & 1 deletion app/email-incoming/circulars/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* SPDX-License-Identifier: Apache-2.0
*/
import { tables } from '@architect/functions'
import 'source-map-support/register'

import {
bodyIsValid,
Expand Down
1 change: 0 additions & 1 deletion app/email-incoming/support/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
transformRecipients,
/* @ts-expect-error: aws-lambda-ses-forwarder does not have type definitions */
} from 'aws-lambda-ses-forwarder'
import 'source-map-support/register'

import { createEmailIncomingMessageHandler } from '../handler'
import { getEnvOrDie, hostname } from '~/lib/env.server'
Expand Down
1 change: 0 additions & 1 deletion app/scheduled/ads/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/
import { tables } from '@architect/functions'
import { ConditionalCheckFailedException } from '@aws-sdk/client-dynamodb'
import 'source-map-support/register'

import { getEnvOrDie } from '~/lib/env.server'

Expand Down
2 changes: 0 additions & 2 deletions app/scheduled/circulars/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
import 'source-map-support/register'

import { forAllCirculars } from './actions'
import { sitemapAction } from './actions/sitemap'
import { statsAction } from './actions/stats'
Expand Down
1 change: 0 additions & 1 deletion app/table-streams/circulars/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import { search as getSearchClient } from '@nasa-gcn/architect-functions-search'
import { errors } from '@opensearch-project/opensearch'
import type { DynamoDBRecord } from 'aws-lambda'
import 'source-map-support/register'

import { unmarshallTrigger } from '../utils'
import { send as sendKafka } from '~/lib/kafka.server'
Expand Down
1 change: 0 additions & 1 deletion app/table-streams/synonyms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import { search as getSearchClient } from '@nasa-gcn/architect-functions-search'
import { errors } from '@opensearch-project/opensearch'
import type { DynamoDBRecord } from 'aws-lambda'
import 'source-map-support/register'

import { unmarshallTrigger } from '../utils'
import { createTriggerHandler } from '~/lib/lambdaTrigger.server'
Expand Down
3 changes: 1 addition & 2 deletions esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ const options = {
platform: 'node',
target: ['node20'],
minify: !dev,
sourcemap: true,
sourcesContent: false,
sourcemap: dev,
metafile: true,
loader: { '.node': 'empty' },
plugins: [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"license": "Apache-2.0",
"scripts": {
"build:remix": "remix build --sourcemap && mv build/server/metafile.* build/",
"build:remix": "remix build && mv build/server/metafile.* build/",
"build:sass": "sass -Inode_modules/nasawds/src/theme -Inode_modules/@uswds -Inode_modules/@uswds/uswds/packages app:app",
"build:esbuild": "node esbuild.js",
"build:website": "run-s build:sass build:remix",
Expand Down
3 changes: 2 additions & 1 deletion server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import { type RequestHandler, createRequestHandler } from '@remix-run/architect'
import * as build from '@remix-run/dev/server-build'
import { installGlobals } from '@remix-run/node'
import { type APIGatewayProxyStructuredResultV2 } from 'aws-lambda'
import 'source-map-support/register'
import sourceMapSupport from 'source-map-support'

sourceMapSupport.install()
installGlobals({ nativeFetch: true })

const remixHandler = createRequestHandler({
Expand Down
14 changes: 0 additions & 14 deletions src/plugins/enable-source-maps.js

This file was deleted.

0 comments on commit 4ea4afa

Please sign in to comment.