Skip to content

Commit eb6fec8

Browse files
authored
chore: Add source maps to build output (#464)
Summary: Update Rollup build configuration to produce source maps for the minified .js files. This helps with debugging any SDK issues or usage. Test plan: Manually tested in Node, using built-in debugger with Chrome dev tools
1 parent 862408c commit eb6fec8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/optimizely-sdk/rollup.config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ const getCjsConfigForPlatform = (platform) => {
3333
exports: 'named',
3434
format: 'cjs',
3535
file: `dist/optimizely.${platform}.min.js`,
36-
plugins: [ terser() ]
36+
plugins: [ terser() ],
37+
sourcemap: true,
3738
}
3839
};
3940
};
@@ -44,7 +45,8 @@ const esModuleConfig = {
4445
exports: 'named',
4546
format: 'es',
4647
file: 'dist/optimizely.browser.es.min.js',
47-
plugins: [ terser() ]
48+
plugins: [ terser() ],
49+
sourcemap: true,
4850
}
4951
}
5052

@@ -83,6 +85,7 @@ const umdconfig = {
8385
file: 'dist/optimizely.browser.umd.min.js',
8486
exports: 'named',
8587
plugins: [ terser() ],
88+
sourcemap: true,
8689
},
8790
],
8891
};
@@ -100,6 +103,7 @@ const jsonSchemaValidatorConfig = {
100103
format: 'cjs',
101104
file: 'dist/optimizely.json_schema_validator.min.js',
102105
plugins: [ terser() ],
106+
sourcemap: true,
103107
}
104108
};
105109

0 commit comments

Comments
 (0)