fix(acquisition): standardize bundling and externalize React/PDF dependencies
- Added JSX support to esbuild configuration. - Externalized react, react-dom, and @react-pdf/renderer to avoid redundant bundling. - Updated acquisition-library exports for modular PDF generation.
This commit is contained in:
@@ -21,9 +21,13 @@ build({
|
||||
platform: 'node',
|
||||
target: 'node18',
|
||||
outfile: outfile,
|
||||
format: 'esm',
|
||||
// Bundle everything, including Directus SDK, to avoid resolution issues in Docker
|
||||
external: ["jsdom", "jsdom/*", "jquery", "jquery/*", "canvas", "fs", "path", "os", "http", "https", "zlib", "stream", "util", "url", "net", "tls", "crypto"],
|
||||
jsx: 'automatic',
|
||||
loader: {
|
||||
'.tsx': 'tsx',
|
||||
'.ts': 'ts',
|
||||
'.js': 'js',
|
||||
},
|
||||
external: ["@react-pdf/renderer", "react", "react-dom", "jsdom", "jsdom/*", "jquery", "jquery/*", "canvas", "fs", "path", "os", "http", "https", "zlib", "stream", "util", "url", "net", "tls", "crypto"],
|
||||
plugins: [{
|
||||
name: 'mock-canvas',
|
||||
setup(build) {
|
||||
|
||||
Reference in New Issue
Block a user