Skip to content

Commit

Permalink
rename dist to esm
Browse files Browse the repository at this point in the history
  • Loading branch information
jeetiss authored and molefrog committed May 26, 2023
1 parent 95490c7 commit 4791554
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -14,6 +14,7 @@ node_modules/
/pnpm-lock.yaml

# bundler
esm/
dist/
.cache

Expand Down
8 changes: 4 additions & 4 deletions package.json
Expand Up @@ -35,24 +35,24 @@
},
"size-limit": [
{
"path": "packages/wouter/dist/index.js",
"path": "packages/wouter/esm/index.js",
"limit": "2000 B",
"ignore": ["react", "use-sync-external-store"]
},
{

"path": "packages/wouter/dist/use-location.js",
"path": "packages/wouter/esm/use-location.js",
"limit": "1000 B",
"ignore": ["react", "use-sync-external-store"]
},
{
"path": "packages/wouter-preact/dist/index.js",
"path": "packages/wouter-preact/esm/index.js",
"limit": "2000 B",
"ignore": ["preact", "preact/hooks"]
},

{
"path": "packages/wouter-preact/dist/use-location.js",
"path": "packages/wouter-preact/esm/use-location.js",
"limit": "1000 B",
"ignore": ["preact", "preact/hooks"]
}
Expand Down
12 changes: 6 additions & 6 deletions packages/wouter-preact/package.json
Expand Up @@ -13,29 +13,29 @@
"useLocation"
],
"files": [
"dist",
"esm",
"types/**/*.d.ts",
"types/*.d.ts"
],
"exports": {
".": {
"types": "./types/ts4.1/index.d.ts",
"default": "./dist/index.js"
"default": "./esm/index.js"
},
"./use-location": {
"types": "./types/use-location.d.ts",
"default": "./dist/use-location.js"
"default": "./esm/use-location.js"
},
"./matcher": {
"types": "./types/matcher.d.ts",
"default": "./dist/matcher.js"
"default": "./esm/matcher.js"
},
"./static-location": {
"types": "./types/static-location.d.ts",
"default": "./dist/static-location.js"
"default": "./esm/static-location.js"
}
},
"module": "dist/index.js",
"module": "esm/index.js",
"types": "types/ts3.9.4/index.d.ts",
"typesVersions": {
">=4.1": {
Expand Down
2 changes: 1 addition & 1 deletion packages/wouter-preact/rollup.config.js
Expand Up @@ -13,7 +13,7 @@ export default defineConfig([
external: ["preact", "preact/hooks"],

output: {
dir: "dist",
dir: "esm",
format: "esm",
},
plugins: [
Expand Down
12 changes: 6 additions & 6 deletions packages/wouter/package.json
Expand Up @@ -13,29 +13,29 @@
"useLocation"
],
"files": [
"dist",
"esm",
"types/**/*.d.ts",
"types/*.d.ts"
],
"exports": {
".": {
"types": "./types/ts4.1/index.d.ts",
"default": "./dist/index.js"
"default": "./esm/index.js"
},
"./use-location": {
"types": "./types/use-location.d.ts",
"default": "./dist/use-location.js"
"default": "./esm/use-location.js"
},
"./matcher": {
"types": "./types/matcher.d.ts",
"default": "./dist/matcher.js"
"default": "./esm/matcher.js"
},
"./static-location": {
"types": "./types/static-location.d.ts",
"default": "./dist/static-location.js"
"default": "./esm/static-location.js"
}
},
"module": "dist/index.js",
"module": "esm/index.js",
"types": "types/ts3.9.4/index.d.ts",
"typesVersions": {
">=4.1": {
Expand Down
4 changes: 2 additions & 2 deletions packages/wouter/rollup.config.js
Expand Up @@ -4,7 +4,7 @@ export default defineConfig([
{
input: ["src/react-deps.js"],
output: {
dir: "dist",
dir: "esm",
format: "esm",
},
external: [
Expand All @@ -22,7 +22,7 @@ export default defineConfig([
],
external: [/react-deps/],
output: {
dir: "dist",
dir: "esm",
format: "esm",
},
},
Expand Down

0 comments on commit 4791554

Please sign in to comment.