File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
heft-plugins/heft-jest-plugin/src
rigs/local-node-rig/profiles/default/config Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -893,6 +893,7 @@ export default class JestPlugin implements IHeftTaskPlugin<IJestPluginOptions> {
893893 * - replace `<rootDir>` with the same rootDir
894894 * - replace `<configDir>` with the directory containing the current configuration file
895895 * - replace `<packageDir:...>` with the path to the resolved package (NOT module)
896+ * - re-path `@rushstack/heft-jest-plugin/lib/...` to `@rushstack/heft-jest-plugin/lib-commonjs/...`
896897 */
897898 private static _getJsonPathMetadata (
898899 options : IJestResolutionOptions
@@ -970,7 +971,12 @@ export default class JestPlugin implements IHeftTaskPlugin<IJestPluginOptions> {
970971
971972 // Example: @rushstack /heft-jest-plugin/path/to/file.js
972973 if ( propertyValue . startsWith ( PLUGIN_PACKAGE_NAME ) ) {
973- const restOfPath : string = path . normalize ( './' + propertyValue . slice ( PLUGIN_PACKAGE_NAME . length ) ) ;
974+ debugger ;
975+ let restOfPath : string = path . posix . normalize (
976+ './' + propertyValue . slice ( PLUGIN_PACKAGE_NAME . length )
977+ ) ;
978+ restOfPath = restOfPath . replace ( / ^ ( \. \/ ) ? l i b ( \/ | \\ ) / , 'lib-commonjs/' ) ;
979+
974980 return path . join ( PLUGIN_PACKAGE_FOLDER , restOfPath ) ;
975981 }
976982
Original file line number Diff line number Diff line change 2525 ]
2626 ],
2727
28- "resolver" : " @rushstack/heft-jest-plugin/lib/exports/jest-node-modules-symlink-resolver.js"
28+ "resolver" : " @rushstack/heft-jest-plugin/lib-commonjs /exports/jest-node-modules-symlink-resolver.js"
2929}
You can’t perform that action at this time.
0 commit comments