-
Notifications
You must be signed in to change notification settings - Fork 225
Conversation
The package.json template can also be updated https://github.com/Shopify/quilt/blob/main/templates/package.hbs.json |
Updating this test to https://github.com/Shopify/quilt/blob/main/tests/consistent-package-json.test.ts#L145 |
70081b6
to
8938590
Compare
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.
Code changes look good.
A nitpick: What's with thinking behind the reordering of the . import? It's doesn't make any difference but I'd say the what you get when you import @shopify/PACKAGENAMEHERE
would be the most important export to see, and thus it deserves to be at the top of the list, above what you get when importing @shopify/PACKAGENAMEHERE/blah
@@ -68,12 +68,6 @@ | |||
"module": "index.mjs", | |||
"esnext": "index.esnext", | |||
"exports": { | |||
"./": "./", | |||
".": { |
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.
What's with thinking behind the reordering of the . import? It's doesn't make any difference but I'd say the what you get when you import @shopify/PACKAGENAMEHERE
would be the most important export to see, and thus it deserves to be at the top of the list
@@ -95,7 +89,13 @@ | |||
"esnext": "./webpack-loader.esnext", | |||
"import": "./webpack-loader.mjs", | |||
"require": "./webpack-loader.js" | |||
} | |||
}, | |||
".": { |
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.
Same Q
@@ -54,16 +54,16 @@ | |||
"module": "index.mjs", | |||
"esnext": "index.esnext", | |||
"exports": { | |||
"./": "./", | |||
"./matchers": { |
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.
Same Q
@@ -224,11 +223,6 @@ | |||
"import": "./idle-callback.node.mjs", | |||
"require": "./idle-callback.node.js" | |||
}, | |||
".": { |
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.
One more reorder
@@ -56,16 +56,16 @@ | |||
"module": "index.mjs", | |||
"esnext": "index.esnext", | |||
"exports": { | |||
"./": "./", | |||
"./testing": { |
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.
One more reorder
@@ -59,16 +59,16 @@ | |||
"module": "index.mjs", | |||
"esnext": "index.esnext", | |||
"exports": { | |||
"./": "./", | |||
"./server": { |
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.
One more reorder
@@ -62,16 +62,16 @@ | |||
"module": "index.mjs", | |||
"esnext": "index.esnext", | |||
"exports": { | |||
"./": "./", | |||
"./server": { |
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.
One more reorder
@@ -82,16 +82,16 @@ | |||
"module": "index.mjs", | |||
"esnext": "index.esnext", | |||
"exports": { | |||
"./": "./", | |||
"./webpack-plugin": { |
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.
One more reorder
@@ -53,16 +53,16 @@ | |||
"module": "index.mjs", | |||
"esnext": "index.esnext", | |||
"exports": { | |||
"./": "./", | |||
"./matchers": { |
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.
One more reorder
@@ -21,12 +21,6 @@ | |||
} | |||
}, | |||
"exports": { | |||
".": { |
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.
One more reorder
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.
Let's get this out!
69db61b
to
ce5162b
Compare
Description
Fixes (issue https://github.com/Shopify/web/issues/56743)
The
./
pattern for package exports is deprecated and ignored https://webpack.js.org/guides/package-exports/#supportUpdated too
./*
which is viable. Also sorted the exported order to reflect: https://webpack.js.org/guides/package-exports/#notes-about-orderingType of change
Checklist