Skip to content

Commit e674219

Browse files
committed
fix: allow build of converter-frontend
1 parent 9bffd83 commit e674219

File tree

4 files changed

+9
-24
lines changed

4 files changed

+9
-24
lines changed

apps/converter-frontend/components/converted-block-local/converted-block-local.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ async function downloadAll(images: { [key: string]: Blob } | undefined, text: st
3434
const addedStuff = await Promise.all(
3535
Object.entries(images).map(([url, img]) => {
3636
const rawExtension = url.split('.').pop() ?? 'jpg'
37-
const fileName = `media/` + url.split('/').pop() ?? 'image.jpg'
37+
const fileName = `media/` + (url.split('/').pop() ?? 'image.jpg')
3838
const extension = extensionMap[rawExtension] ?? rawExtension
3939

4040
const file = new Blob([img], {

apps/converter-frontend/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/basic-features/typescript for more information.
5+
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
// eslint-disable-next-line @typescript-eslint/no-var-requires
22
// @ts-check
33

4-
import { withNx } from "@nx/next/plugins/with-nx.js";
5-
import path from "path";
6-
74
/**
85
* @type {import('@nx/next/plugins/with-nx.js').WithNxOptions}
96
**/
107
const nextConfig = {
11-
// nx: {
12-
// // Set this to true if you would like to to use SVGR
13-
// // See: https://github.com/gregberge/svgr
14-
// svgr: false,
15-
// },
8+
output: "standalone",
169
transpilePackages: ["rejour-stringify", "docx-to-vfile", "reoff-cite"],
1710
experimental: {
1811
serverComponentsExternalPackages: ["swc", "@swc/wasm", "esbuild"],
@@ -24,9 +17,6 @@ const nextConfig = {
2417

2518
return config;
2619
},
27-
// experimental: {
28-
// outputFileTracingRoot: new URL('../../', import.meta.url).pathname,
29-
// },
3020
};
3121

32-
export default nextConfig; // withNx(nextConfig)
22+
export default nextConfig;

apps/converter-frontend/project.json

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,12 @@
55
"projectType": "application",
66
"targets": {
77
"build": {
8-
"command": "next build apps/converter-frontend",
9-
"outputs": ["{options.outputPath}"],
10-
"defaultConfiguration": "production",
8+
"executor": "nx:run-commands",
9+
"outputs": ["{workspaceRoot}/apps/converter-frontend/.next"],
1110
"options": {
12-
"root": "apps/converter-frontend",
13-
"outputPath": "dist/apps/converter-frontend"
14-
},
15-
"dependsOn": ["^build"],
16-
"configurations": {
17-
"production": {},
18-
"development": {}
11+
"commands": [
12+
"next build apps/converter-frontend && mv apps/converter-frontend/.next/static apps/converter-frontend/.next/standalone/.next && cp -r apps/converter-frontend/public apps/converter-frontend/.next/standalone"
13+
]
1914
}
2015
},
2116
"serve": {

0 commit comments

Comments
 (0)