Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates to fix netlify website build errors #5785

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"extends": [
"plugin:import/typescript",
"plugin:prettier/recommended",
"plugin:react-hooks/recommended"
"next/core-web-vitals"
],
"plugins": ["@typescript-eslint", "import", "react"],
"parser": "@typescript-eslint/parser",
Expand All @@ -18,7 +18,7 @@
"settings": {
"import/extensions": [".js", ".ts", ".jsx", ".tsx"],
"react": {
"version": "18"
"version": "detect"
}
},
"env": {
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"scripts": {
"build": "yarn build:rollup && yarn build:next",
"build:next": "cd ./site && next build && next export",
"build:next": "cd ./site && next build",
"build:rollup": "rollup --config ./config/rollup/rollup.config.js --bundleConfigAsCjs",
"changesetversion": "yarn changeset version && yarn install && git add .",
"clean": "rimraf './packages/*/{dist,lib,node_modules}' './site/{.next,out}' --glob",
Expand Down Expand Up @@ -74,6 +74,7 @@
"eslint": "^8.51.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-next": "^0.0.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
Expand Down Expand Up @@ -127,5 +128,8 @@
"eslint --fix"
]
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"dependencies": {
"eslint-config-next": "^15.1.2"
}
}
3 changes: 2 additions & 1 deletion site/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ const fs = require('fs')
const path = require('path')

module.exports = {
output: 'export',
webpack: config => {
config.module.rules.push({
test: /\.js$/,
enforce: 'pre',
exclude: [/node_modules[\\\/]@next/, /node_modules[\\\/]next/],
exclude: [/node_modules[\\/](?:@next|next)/],
use: [
{
loader: require.resolve('source-map-loader'),
Expand Down
9 changes: 7 additions & 2 deletions site/pages/examples/[example].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ const Tab = React.forwardRef(
/>
)
)
Tab.displayName = 'Tab'

const Wrapper = ({ className, ...props }) => (
<div
Expand Down Expand Up @@ -282,7 +283,9 @@ const ExamplePage = ({ example }: { example: string }) => {
}}
fallbackRender={({ error, resetErrorBoundary }) => (
<Warning>
<p>An error was thrown by one of the example's React components!</p>
<p>
An error was thrown by one of the example&apos;s React components!
</p>
<pre>
<code>
{error.stack}
Expand Down Expand Up @@ -354,7 +357,9 @@ const ExamplePage = ({ example }: { example: string }) => {
</TabList>
{error ? (
<Warning>
<p>An error was thrown by one of the example's React components!</p>
<p>
An error was thrown by one of the example&apos;s React components!
</p>
<pre>
<code>
<>
Expand Down
Loading
Loading