create-nextblock 0.8.6 → 0.8.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/create-nextblock.js
CHANGED
|
@@ -1677,6 +1677,9 @@ async function normalizeTsconfig(projectDir) {
|
|
|
1677
1677
|
'**/*.js',
|
|
1678
1678
|
'**/*.jsx',
|
|
1679
1679
|
'.next/types/**/*.ts',
|
|
1680
|
+
// Next 16 (Turbopack dev) auto-adds this on first `next dev`; pre-include it so the
|
|
1681
|
+
// "we reconfigured your tsconfig" message never appears.
|
|
1682
|
+
'.next/dev/types/**/*.ts',
|
|
1680
1683
|
]);
|
|
1681
1684
|
|
|
1682
1685
|
if (Array.isArray(tsconfig.include)) {
|
|
@@ -1704,6 +1707,9 @@ async function normalizeTsconfig(projectDir) {
|
|
|
1704
1707
|
...(tsconfig.compilerOptions ?? {}),
|
|
1705
1708
|
baseUrl: '.',
|
|
1706
1709
|
skipLibCheck: true,
|
|
1710
|
+
// Next 16 sets this on first run (React automatic runtime); pre-set it to avoid the
|
|
1711
|
+
// "mandatory changes were made to your tsconfig" message.
|
|
1712
|
+
jsx: 'react-jsx',
|
|
1707
1713
|
};
|
|
1708
1714
|
|
|
1709
1715
|
const compilerOptions = tsconfig.compilerOptions;
|
|
@@ -1928,6 +1934,9 @@ function buildNextConfigContent(editorUtilNames) {
|
|
|
1928
1934
|
" formats: ['image/avif', 'image/webp'],",
|
|
1929
1935
|
' imageSizes: [16, 32, 48, 64, 96, 128, 256, 384, 512],',
|
|
1930
1936
|
' deviceSizes: [320, 480, 640, 750, 828, 1080, 1200, 1440, 1920, 2048, 2560],',
|
|
1937
|
+
// Next 16 requires every next/image `quality` value to be whitelisted here; the app uses
|
|
1938
|
+
// both 60 and 75, so without this the quality="60" images warn on every render.
|
|
1939
|
+
' qualities: [60, 75],',
|
|
1931
1940
|
' minimumCacheTTL: 31536000,',
|
|
1932
1941
|
' dangerouslyAllowSVG: false,',
|
|
1933
1942
|
" contentSecurityPolicy: \"default-src 'self'; script-src 'none'; sandbox;\",",
|
|
@@ -1939,7 +1948,12 @@ function buildNextConfigContent(editorUtilNames) {
|
|
|
1939
1948
|
// "Cannot find module 'critters'" at dev/build time.
|
|
1940
1949
|
" cssChunking: 'strict',",
|
|
1941
1950
|
' },',
|
|
1942
|
-
|
|
1951
|
+
// Transpile ALL @nextblock-cms packages so Next applies React Server Component layer
|
|
1952
|
+
// semantics to them (the react-server condition for 'server-only', 'use client'/'use
|
|
1953
|
+
// server' directives). Without db/sdk/ecommerce here, db/server's `import 'server-only'`
|
|
1954
|
+
// throws even from a Server Component, because Next treats the prebuilt package as an
|
|
1955
|
+
// external and skips the server-layer processing the monorepo gets for free from source.
|
|
1956
|
+
" transpilePackages: ['@nextblock-cms/utils', '@nextblock-cms/ui', '@nextblock-cms/editor', '@nextblock-cms/db', '@nextblock-cms/sdk', '@nextblock-cms/ecommerce'],",
|
|
1943
1957
|
' webpack: (config, { isServer }) => {',
|
|
1944
1958
|
' config.resolve = config.resolve || {};',
|
|
1945
1959
|
' config.resolve.alias = {',
|
package/package.json
CHANGED