mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-03-19 15:01:06 +08:00
fix(server): Fix for next.js output file tracing.
This commit is contained in:
parent
51bc05f835
commit
34c3f2d91a
@ -30,6 +30,7 @@ module.exports = withLess({
|
||||
// experimental: {
|
||||
// concurrentFeatures: true,
|
||||
// },
|
||||
outputFileTracing: true,
|
||||
eslint: {
|
||||
ignoreDuringBuilds: true,
|
||||
},
|
||||
|
@ -13,13 +13,14 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
import { createApiContext, getPageConfig, getRootConfig } from '@lowdefy/api';
|
||||
|
||||
import Page from '../lib/Page.js';
|
||||
|
||||
export async function getStaticProps() {
|
||||
const apiContext = await createApiContext({ buildDirectory: './build' });
|
||||
// Important to give absolute path so Next can trace build files
|
||||
const apiContext = await createApiContext({ buildDirectory: path.join(process.cwd(), 'build') });
|
||||
|
||||
const [rootConfig, pageConfig] = await Promise.all([
|
||||
getRootConfig(apiContext),
|
||||
|
@ -14,6 +14,7 @@
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
import { createApiContext, getPageConfig, getRootConfig } from '@lowdefy/api';
|
||||
|
||||
import getServerSession from '../lib/auth/getServerSession.js';
|
||||
@ -22,8 +23,9 @@ import Page from '../lib/Page.js';
|
||||
export async function getServerSideProps(context) {
|
||||
const { pageId } = context.params;
|
||||
const session = await getServerSession(context);
|
||||
// Important to give absolute path so Next can trace build files
|
||||
const apiContext = await createApiContext({
|
||||
buildDirectory: './build',
|
||||
buildDirectory: path.join(process.cwd(), 'build'),
|
||||
logger: console,
|
||||
session,
|
||||
});
|
||||
|
@ -14,6 +14,7 @@
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
import { callRequest, createApiContext } from '@lowdefy/api';
|
||||
import { getSecretsFromEnv } from '@lowdefy/node-utils';
|
||||
|
||||
@ -28,8 +29,9 @@ export default async function handler(req, res) {
|
||||
throw new Error('Only POST requests are supported.');
|
||||
}
|
||||
const session = await getServerSession({ req });
|
||||
// Important to give absolute path so Next can trace build files
|
||||
const apiContext = await createApiContext({
|
||||
buildDirectory: './build',
|
||||
buildDirectory: path.join(process.cwd(), 'build'),
|
||||
connections,
|
||||
// logger: console,
|
||||
logger: { debug: () => {} },
|
||||
|
@ -14,6 +14,7 @@
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
import { createApiContext, getPageConfig, getRootConfig } from '@lowdefy/api';
|
||||
|
||||
import getServerSession from '../lib/auth/getServerSession.js';
|
||||
@ -22,8 +23,9 @@ import Page from '../lib/Page.js';
|
||||
export async function getServerSideProps(context) {
|
||||
const session = await getServerSession(context);
|
||||
|
||||
// Important to give absolute path so Next can trace build files
|
||||
const apiContext = await createApiContext({
|
||||
buildDirectory: './build',
|
||||
buildDirectory: path.join(process.cwd(), 'build'),
|
||||
logger: console,
|
||||
session,
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user