Skip to content

Commit

Permalink
fix: move away from mjs extension to work in more environments
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedAymanM authored and gregberge committed Jun 18, 2021
1 parent 4865316 commit 9098b83
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 29 deletions.
4 changes: 2 additions & 2 deletions build/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default [
sourcemap: true,
},
{
file: `${name}.mjs`,
file: `${name}.esm.js`,
format: 'es',
sourcemap: true,
},
Expand All @@ -41,7 +41,7 @@ export default [
})],
output: [
{
file: `${name}.min.mjs`,
file: `${name}.min.esm.js`,
format: 'es',
},
],
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,23 @@
"bundlewatch": {
"files": [
{
"path": "packages/core/dist/index.min.mjs",
"path": "packages/core/dist/index.min.esm.js",
"maxSize": "2.8kB"
},
{
"path": "packages/emotion/dist/index.min.mjs",
"path": "packages/emotion/dist/index.min.esm.js",
"maxSize": "1.6kB"
},
{
"path": "packages/styled-components/dist/index.min.mjs",
"path": "packages/styled-components/dist/index.min.esm.js",
"maxSize": "1.3kB"
},
{
"path": "packages/system/dist/index.min.mjs",
"path": "packages/system/dist/index.min.esm.js",
"maxSize": "11.4kB"
},
{
"path": "packages/util/dist/index.min.mjs",
"path": "packages/util/dist/index.min.esm.js",
"maxSize": "0.7kB"
}
]
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-preset-emotion-css-prop/.npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/dist/*
!/dist/index.{d.ts,js,mjs}
!/dist/index.{js,mjs}.map
!/dist/index.{d.ts,js,esm.js}
!/dist/index.{js,esm.js}.map
2 changes: 1 addition & 1 deletion packages/babel-preset-emotion-css-prop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "3.0.1",
"sideEffects": false,
"main": "dist/index.js",
"module": "dist/index.mjs",
"module": "dist/index.esm.js",
"typings": "dist/index.d.js",
"author": "Greg Bergé <berge.greg@gmail.com>",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/.npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/dist/*
!/dist/index.{d.ts,js,mjs}
!/dist/index.{js,mjs}.map
!/dist/index.{d.ts,js,esm.js}
!/dist/index.{js,esm.js}.map
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "3.0.1",
"sideEffects": false,
"main": "dist/index.js",
"module": "dist/index.mjs",
"module": "dist/index.esm.js",
"typings": "dist/index.d.ts",
"author": "Greg Bergé <berge.greg@gmail.com>",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions packages/emotion/.npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/dist/*
!/dist/index.{d.ts,js,mjs}
!/dist/index.{js,mjs}.map
!/dist/index.{d.ts,js,esm.js}
!/dist/index.{js,esm.js}.map
2 changes: 1 addition & 1 deletion packages/emotion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"sideEffects": false,
"main": "dist/index.js",
"module": "dist/index.mjs",
"module": "dist/index.esm.js",
"typings": "dist/index.d.ts",
"author": "Greg Bergé <berge.greg@gmail.com>",
"license": "MIT",
Expand Down
7 changes: 3 additions & 4 deletions packages/prop-types/.npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/*
!/dist/**/*.js
!/dist/**/*.map
*.test.ts
*.test.tsx
/dist/*
!/dist/index.{d.ts,js,esm.js}
!/dist/index.{js,esm.js}.map
2 changes: 1 addition & 1 deletion packages/prop-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
],
"sideEffects": false,
"main": "dist/index.js",
"module": "dist/index.mjs",
"module": "dist/index.esm.js",
"typings": "dist/index.d.ts",
"author": "Greg Bergé <berge.greg@gmail.com>",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions packages/styled-components/.npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/dist/*
!/dist/index.{d.ts,js,mjs}
!/dist/index.{js,mjs}.map
!/dist/index.{d.ts,js,esm.js}
!/dist/index.{js,esm.js}.map
4 changes: 2 additions & 2 deletions packages/system/.npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/dist/*
!/dist/index.{d.ts,js,mjs}
!/dist/index.{js,mjs}.map
!/dist/index.{d.ts,js,esm.js}
!/dist/index.{js,esm.js}.map
2 changes: 1 addition & 1 deletion packages/system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"sideEffects": false,
"main": "dist/index.js",
"module": "dist/index.js",
"module": "dist/index.esm.js",
"typings": "dist/index.d.ts",
"author": "Greg Bergé <berge.greg@gmail.com>",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions packages/util/.npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/dist/*
!/dist/index.{d.ts,js,mjs}
!/dist/index.{js,mjs}.map
!/dist/index.{d.ts,js,esm.js}
!/dist/index.{js,esm.js}.map
2 changes: 1 addition & 1 deletion packages/util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "3.0.1",
"sideEffects": false,
"main": "dist/index.js",
"module": "dist/index.mjs",
"module": "dist/index.esm.js",
"typings": "dist/index.d.ts",
"author": "Greg Bergé <berge.greg@gmail.com>",
"license": "MIT",
Expand Down

0 comments on commit 9098b83

Please sign in to comment.