chore: wepback dev works, turbo still not

This commit is contained in:
James
2024-03-06 15:30:08 -05:00
parent a9f1b3eea9
commit d106037f42
3 changed files with 15 additions and 7 deletions

View File

@@ -8,6 +8,14 @@ const withBundleAnalyzer = bundleAnalyzer({
export default withBundleAnalyzer(
withPayload({
reactStrictMode: false,
webpack: (webpackConfig) => {
webpackConfig.resolve.extensionAlias = {
'.js': ['.ts', '.tsx', '.js', '.jsx'],
'.mjs': ['.mts', '.mjs'],
'.cjs': ['.cts', '.cjs'],
}
return webpackConfig
},
async redirects() {
return [
{

View File

@@ -3,8 +3,8 @@
"version": "3.0.0-alpha.23",
"description": "Node, React and MongoDB Headless CMS and Application Framework",
"license": "MIT",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"main": "./src/index.js",
"types": "./src/index.ts",
"type": "module",
"bin": {
"payload": "bin.js"

View File

@@ -1,5 +1,5 @@
import { pino } from 'pino'
import { PinoPretty } from 'pino-pretty'
import pino from 'pino'
import PinoPretty from 'pino-pretty'
export type PayloadLogger = pino.Logger
@@ -16,7 +16,7 @@ export const defaultLoggerOptions: pino.LoggerOptions = {
},
}
export const prettySyncLoggerDestination = PinoPretty({
export const prettySyncLoggerDestination = PinoPretty.default({
...prettyOptions,
destination: 1, // stdout
sync: true,
@@ -28,7 +28,7 @@ const getLogger = (
destination?: pino.DestinationStream,
): PayloadLogger => {
if (options) {
return pino(
return pino.default(
{
name: options?.name || name,
enabled: process.env.DISABLE_LOGGING !== 'true',
@@ -38,7 +38,7 @@ const getLogger = (
)
}
return pino(prettySyncLoggerDestination)
return pino.default(prettySyncLoggerDestination)
}
export default getLogger