mirror of
https://github.com/luxfi/bridge.git
synced 2026-09-24 00:26:46 +00:00
@luxfi/utila could not build — name its outDir
RollupError: [plugin typescript] @rollup/plugin-typescript: Path of
Typescript compiler option 'outDir' must be located inside the same
directory as the Rollup 'file' option.
No tsconfig in the chain sets outDir, so the plugin defaults it to the
tsconfig's own directory — pkg/utila — and then rejects it, because it requires
outDir to sit inside the directory each Rollup `file` writes to. Both outputs go
to dist/, so one value satisfies both.
This fails identically on a laptop, so it is not a container problem: the
package has simply been unbuildable since the toolchain moved under it, and
nobody noticed because dist/ was built once long ago and has been sitting there
older than its own sources. It only surfaced now because app/server's image
needs to build it from a clean checkout.
Verified: dist/index.cjs.js exports createGrpcClient and
serviceAccountAuthStrategy, which are what domain/utila.ts and
domain/cosigners.ts import.
Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
@@ -14,5 +14,14 @@ export default {
|
||||
format: 'esm',
|
||||
},
|
||||
],
|
||||
plugins: [typescript(), resolve(), commonjs()],
|
||||
// outDir has to be named. No tsconfig in the chain sets one, so the plugin
|
||||
// defaults it to the tsconfig's own directory — pkg/utila — and then refuses
|
||||
// it, because it validates that outDir sits inside the directory each Rollup
|
||||
// `file` writes to:
|
||||
// Path of Typescript compiler option 'outDir' must be located inside the
|
||||
// same directory as the Rollup 'file' option.
|
||||
// Both outputs go to dist/, so one value satisfies both. Without it the build
|
||||
// simply does not run — which is why dist/ here is older than the sources it
|
||||
// is built from, and why the server image could not be rebuilt.
|
||||
plugins: [typescript({ outDir: 'dist' }), resolve(), commonjs()],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user