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

fix: ensure lodash is optimized in every monorepo package #4005

Merged
merged 1 commit into from
Dec 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions package.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {optimizeLodashImports} from '@optimize-lodash/rollup-plugin'
import {defineConfig} from '@sanity/pkg-utils'

export default defineConfig({
Expand All @@ -16,4 +17,7 @@ export default defineConfig({
},
legacyExports: true,
minify: false,
rollup: {
plugins: [optimizeLodashImports()],
},
})
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"@babel/preset-env": "^7.19.1",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@optimize-lodash/rollup-plugin": "^4.0.1",
"@rexxars/babel-plugin-inline-json-import": "^0.3.4",
"@sanity/client": "^3.4.1",
"@sanity/pkg-utils": "^1.17.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/block-tools/.depcheckignore.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore": ["@sanity/pkg-utils"]
"ignore": ["@optimize-lodash/rollup-plugin", "@sanity/pkg-utils"]
}
1 change: 1 addition & 0 deletions packages/@sanity/cli/.depcheckignore.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"ignore": [
"@babel/parser",
"@optimize-lodash/rollup-plugin",
"@sanity/asset-utils",
"@sanity/base",
"@sanity/color",
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/diff/.depcheckignore.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore": ["@sanity/pkg-utils"]
"ignore": ["@optimize-lodash/rollup-plugin", "@sanity/pkg-utils"]
}
2 changes: 1 addition & 1 deletion packages/@sanity/mutator/.depcheckignore.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore": ["@sanity/pkg-utils"]
"ignore": ["@optimize-lodash/rollup-plugin", "@sanity/pkg-utils"]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore": ["@sanity/pkg-utils"]
"ignore": ["@optimize-lodash/rollup-plugin", "@sanity/pkg-utils"]
}
2 changes: 1 addition & 1 deletion packages/@sanity/schema/.depcheckignore.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore": ["@sanity/pkg-utils"]
"ignore": ["@optimize-lodash/rollup-plugin", "@sanity/pkg-utils"]
}
2 changes: 1 addition & 1 deletion packages/@sanity/server/.depcheckignore.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore": ["@sanity/pkg-utils", "styled-components"]
"ignore": ["@optimize-lodash/rollup-plugin", "@sanity/pkg-utils", "styled-components"]
}
1 change: 1 addition & 0 deletions packages/@sanity/types/.depcheckignore.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"ignore": [
"@juggle/resize-observer",
"@optimize-lodash/rollup-plugin",
"@popperjs/core",
"@rexxars/react-sortable-hoc",
"@sanity/bifur-client",
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/util/.depcheckignore.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore": ["@sanity/pkg-utils"]
"ignore": ["@optimize-lodash/rollup-plugin", "@sanity/pkg-utils"]
}
2 changes: 1 addition & 1 deletion packages/@sanity/validation/.depcheckignore.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore": ["@sanity/pkg-utils"]
"ignore": ["@optimize-lodash/rollup-plugin", "@sanity/pkg-utils"]
}
2 changes: 1 addition & 1 deletion packages/@sanity/vision/.depcheckignore.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore": ["@sanity/pkg-utils"]
"ignore": ["@optimize-lodash/rollup-plugin", "@sanity/pkg-utils"]
}
2 changes: 1 addition & 1 deletion packages/groq/.depcheckignore.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore": ["@sanity/pkg-utils"]
"ignore": ["@optimize-lodash/rollup-plugin", "@sanity/pkg-utils"]
}
2 changes: 1 addition & 1 deletion packages/sanity/.depcheckignore.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore": ["@sanity/pkg-utils", "globby", "read-pkg-up", "sanity"]
"ignore": ["@optimize-lodash/rollup-plugin", "@sanity/pkg-utils", "globby", "read-pkg-up", "sanity"]
}
6 changes: 0 additions & 6 deletions packages/sanity/package.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
import {optimizeLodashImports} from '@optimize-lodash/rollup-plugin'
import {defineConfig} from '@sanity/pkg-utils'
import baseConfig from '../../package.config'

export default defineConfig({
...baseConfig,

rollup: {
...baseConfig.rollup,
plugins: [optimizeLodashImports()],
},

exports: (prevExports) => ({
...prevExports,

Expand Down
1 change: 0 additions & 1 deletion packages/sanity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@
"yargs": "^17.3.0"
},
"devDependencies": {
"@optimize-lodash/rollup-plugin": "^4.0.1",
"@sanity/ui-workshop": "^1.0.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
Expand Down