Skip to content

Commit d1beb2f

Browse files
Fix: Disable source maps for production builds to prevent source exposure
Co-authored-by: numbers-official <181934381+numbers-official@users.noreply.github.com>
1 parent 2734ddc commit d1beb2f

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
@@ -10,7 +10,7 @@ export default {
1010
file: 'dist/capture-eye.bundled.js',
1111
format: 'esm',
1212
name: 'CaptureEye',
13-
sourcemap: true,
13+
sourcemap: process.env.MODE !== 'prod',
1414
},
1515
onwarn(warning) {
1616
if (warning.code !== 'THIS_IS_UNDEFINED') {

0 commit comments

Comments
 (0)