fix: build times storybook/swc (#18965)

This commit is contained in:
Kevin Grüneberg authored and GitHub committed 2023-11-14 21:45:12 +01:00
1 parent 9a6afbb961
commit 30958d87fb
5 files changed
+908 -1614

No files matched your search

+14
View File
@@ -34,6 +34,20 @@ const withMDX = nextMdx({
/** @type {import('next').NextConfig} nextConfig */
const nextConfig = {
outputFileTracing: true,
experimental: {
// Storybook 7.5 upgrade seems to causes dev deps to be included in build output, removing it here
outputFileTracingExcludes: {
'*': [
'./node_modules/@swc/core-linux-x64-gnu',
'./node_modules/@swc/core-linux-x64-musl',
'./node_modules/esbuild/**/*',
'./node_modules/webpack/**/*',
'./node_modules/rollup/**/*',
],
},
},
// Append the default value with md extensions
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
// reactStrictMode: true,
+867 -1600
View File
File diff suppressed because it is too large. Load diff
+7 -7
View File
@@ -93,12 +93,12 @@
"@babel/preset-typescript": "^7.21.4",
"@ctrl/tinycolor": "^3.4.0",
"@jest/types": "^29.6.0",
"@storybook/addon-actions": "^7.4.5",
"@storybook/addon-controls": "^7.4.5",
"@storybook/addon-docs": "^7.4.5",
"@storybook/addon-mdx-gfm": "^7.4.5",
"@storybook/addon-actions": "^7.5.3",
"@storybook/addon-controls": "^7.5.3",
"@storybook/addon-docs": "^7.5.3",
"@storybook/addon-mdx-gfm": "^7.5.3",
"@storybook/addon-styling": "^1.3.7",
"@storybook/react": "^7.4.5",
"@storybook/react": "^7.5.3",
"@storybook/react-webpack5": "^7.5.3",
"@testing-library/jest-dom": "^6.1.3",
"@testing-library/react": "^14.0.0",
@@ -115,8 +115,8 @@
"jest-environment-jsdom": "^29.7.0",
"next": "*",
"sql-formatter": "^12.2.0",
"storybook": "^7.0.5",
"storybook-dark-mode": "^3.0.0",
"storybook": "^7.5.3",
"storybook-dark-mode": "^3.0.1",
"style-dictionary": "^3.7.1",
"ts-jest": "^29.1.1",
"tsconfig-paths-webpack-plugin": "^4.0.1",
+13
View File
@@ -27,6 +27,19 @@ const csp = [
const nextConfig = {
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
output: 'standalone',
outputFileTracing: true,
experimental: {
// Storybook 7.5 upgrade seems to causes dev deps to be included in build output, removing it here
outputFileTracingExcludes: {
'*': [
'./node_modules/@swc/core-linux-x64-gnu',
'./node_modules/@swc/core-linux-x64-musl',
'./node_modules/esbuild/**/*',
'./node_modules/webpack/**/*',
'./node_modules/rollup/**/*',
],
},
},
async redirects() {
return [
...(process.env.NEXT_PUBLIC_IS_PLATFORM === 'true'
+7 -7
View File
@@ -116,12 +116,12 @@
},
"devDependencies": {
"@aws-sdk/client-secrets-manager": "^3.410.0",
"@storybook/addon-actions": "^7.4.5",
"@storybook/addon-essentials": "^7.4.5",
"@storybook/addon-interactions": "^7.4.5",
"@storybook/addon-links": "^7.4.5",
"@storybook/react": "^7.4.5",
"@storybook/testing-library": "^0.2.1",
"@storybook/addon-actions": "^7.5.3",
"@storybook/addon-essentials": "^7.5.3",
"@storybook/addon-interactions": "^7.5.3",
"@storybook/addon-links": "^7.5.3",
"@storybook/react": "^7.5.3",
"@storybook/testing-library": "^0.2.2",
"@supabase/postgres-meta": "^0.64.4",
"@tailwindcss/typography": "^0.5.9",
"@testing-library/dom": "^9.3.3",
@@ -158,7 +158,7 @@
"openapi-typescript": "^6.3.4",
"postcss": "^8.4.31",
"prettier": "^2.8.8",
"storybook-dark-mode": "^3.0.0",
"storybook-dark-mode": "^3.0.1",
"superjson": "^1.12.3",
"tailwindcss": "^3.1.8",
"typescript": "^5.2.2"