Skip to content

Commit

Permalink
fix: ensure lodash is optimized in every monorepo package
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan authored and rexxars committed Dec 21, 2022
1 parent 2ac9ccf commit 8494ac0
Show file tree
Hide file tree
Showing 17 changed files with 18 additions and 18 deletions.
4 changes: 4 additions & 0 deletions package.config.ts
@@ -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
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
@@ -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
@@ -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
@@ -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
@@ -1,3 +1,3 @@
{
"ignore": ["@sanity/pkg-utils"]
"ignore": ["@optimize-lodash/rollup-plugin", "@sanity/pkg-utils"]
}
2 changes: 1 addition & 1 deletion packages/@sanity/portable-text-editor/.depcheckignore.json
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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

1 comment on commit 8494ac0

@vercel
Copy link

@vercel vercel bot commented on 8494ac0 Dec 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

test-studio – ./

test-studio.sanity.build
test-studio-git-next.sanity.build

Please sign in to comment.