Skip to content

Commit 6d63db6

Browse files
authored
Merge pull request #89 from numbersprotocol/copilot/fix-source-maps-deployment
Disable source maps in production builds to prevent TypeScript source exposure
2 parents 3116d5d + d1beb2f commit 6d63db6

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/production-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Install dependencies
3434
run: npm ci
3535
- name: Build the project
36-
run: npm run build
36+
run: MODE=prod npm run build
3737
- name: Deploy to GitHub Packages
3838
run: npm publish
3939
env:
@@ -53,7 +53,7 @@ jobs:
5353
- name: Install dependencies
5454
run: npm ci
5555
- name: Build the project
56-
run: npm run build
56+
run: MODE=prod npm run build
5757
- name: Deploy to NPM registry
5858
run: npm publish
5959
env:
@@ -80,7 +80,7 @@ jobs:
8080
- name: Install dependencies
8181
run: npm ci
8282
- name: Build the project
83-
run: npm run build
83+
run: MODE=prod npm run build
8484
- name: Configure AWS credentials
8585
uses: aws-actions/configure-aws-credentials@v3
8686
with:

rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default {
1313
file: 'dist/capture-eye.bundled.js',
1414
format: 'esm',
1515
name: 'CaptureEye',
16-
sourcemap: true,
16+
sourcemap: process.env.MODE !== 'prod',
1717
},
1818
onwarn(warning) {
1919
if (warning.code !== 'THIS_IS_UNDEFINED') {

0 commit comments

Comments
 (0)