-
Notifications
You must be signed in to change notification settings - Fork 10
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
add shared-components package #449
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,10 +10,10 @@ | |
"workspaces": { | ||
"packages": [ | ||
"packages/*" | ||
], | ||
"nohoist": [ | ||
"**" | ||
] | ||
}, | ||
"dependencies": {} | ||
"dependencies": {}, | ||
"resolutions": { | ||
"babel-loader": "8.1.0" | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const path = require('path'); | ||
const { getLoader, loaderByName } = require('@craco/craco'); | ||
|
||
const packages = []; | ||
packages.push(path.join(__dirname, '../shared-components')); | ||
|
||
module.exports = { | ||
webpack: { | ||
configure: (webpackConfig, arg) => { | ||
const { isFound, match } = getLoader( | ||
webpackConfig, | ||
loaderByName('babel-loader') | ||
); | ||
if (isFound) { | ||
const include = Array.isArray(match.loader.include) | ||
? match.loader.include | ||
: [match.loader.include]; | ||
|
||
match.loader.include = include.concat(packages); | ||
} | ||
return webpackConfig; | ||
}, | ||
}, | ||
}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. craco is used so we can load things outside of |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": "src" | ||
"baseUrl": "src", | ||
"jsx": "react-jsx" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
}, | ||
"include": ["src/**/*"], | ||
"include": [ | ||
"src/**/*" | ||
], | ||
"exclude": ["node_modules"] | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,15 @@ | |
"version": "1.0.1", | ||
"private": true, | ||
"dependencies": { | ||
"@craco/craco": "^6.4.5", | ||
"@creativebulma/bulma-tooltip": "^1.2.0", | ||
"@hookform/resolvers": "^2.9.7", | ||
"@hotjar/browser": "^1.0.6", | ||
"@onflow/fcl": "^1.2.0", | ||
"@onflow/sdk": "^1.1.1", | ||
"@onflow/six-transfer-tokens": "0.0.8", | ||
"@tanstack/react-query": "^4.1.0", | ||
"@tanstack/react-query-devtools": "4.0.11-beta.0", | ||
"@tanstack/react-query": "4.3.3", | ||
"@tanstack/react-query-devtools": "4.3.3", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. had to specify exact versions because I was running into this bug that was seemingly introduced yesterday: TanStack/query#4155 |
||
"@trivago/prettier-plugin-sort-imports": "^3.3.0", | ||
"bulma": "0.9.3", | ||
"bulma-popover": "^1.1.1", | ||
|
@@ -44,10 +45,10 @@ | |
"yup": "^0.32.11" | ||
}, | ||
"scripts": { | ||
"start": "react-scripts start", | ||
"build": "react-scripts build", | ||
"test": "react-scripts test", | ||
"test:update": "react-scripts test --updateSnapshot", | ||
"start": "craco start", | ||
"build": "craco build", | ||
"test": "craco test", | ||
"test:update": "craco test --updateSnapshot", | ||
"eject": "react-scripts eject", | ||
"prettier": "npx prettier --write .", | ||
"eslint": "eslint . --ext .js --fix" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nohoist: **
was removed since we need packages to share the samenode_modules
for things likereact
andreact-dom