Skip to content

Commit

Permalink
Merge pull request #495 from reactioncommerce/feat-aldeed-support-mjs
Browse files Browse the repository at this point in the history
chore: updated config for modules and tree shaking
  • Loading branch information
aldeed authored Feb 13, 2019
2 parents 37e3b7f + 6b97ebf commit 712ec6a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"url": "https://reactioncommerce.com"
},
"license": "GPL-3.0",
"sideEffects": false,
"scripts": {
"dev": "NODE_ENV=development node ./src/server.js",
"build": "yarn run build-clean && NODE_ENV=production IS_BUILDING_NEXTJS=1 next build src",
Expand All @@ -31,7 +32,7 @@
},
"dependencies": {
"@material-ui/core": "^3.9.2",
"@reactioncommerce/components": "^0.62.1",
"@reactioncommerce/components": "^0.63.0",
"@reactioncommerce/components-context": "^1.2.0",
"@segment/snippet": "^4.4.0",
"apollo-cache-inmemory": "^1.4.2",
Expand Down
4 changes: 2 additions & 2 deletions src/components/AccountDropdown/AccountDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ class AccountDropdown extends Component {
<div className={classes.accountDropdown}>
{authStore.isAuthenticated ?
<Fragment>
<Button color="primary" fullWidth href={`/logout/${account._id}`} variant="raised">
<Button color="primary" fullWidth href={`/logout/${account._id}`} variant="contained">
Sign Out
</Button>
</Fragment>
:
<Fragment>
<div className={classes.authContent}>
<Button color="primary" fullWidth href="/signin" variant="raised">
<Button color="primary" fullWidth href="/signin" variant="contained">
Sign In
</Button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/stores/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import CartStore from "./CartStore";
import RoutingStore from "./RoutingStore";
import UIStore from "./UIStore";

configure({ enforceActions: true });
configure({ enforceActions: "observed" });

const authStore = new AuthStore("meteorToken");
const cartStore = new CartStore();
Expand Down
5 changes: 5 additions & 0 deletions src/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ module.exports = {
enforce: "pre"
});

webpackConfig.module.rules.push({
test: /\.mjs$/,
type: "javascript/auto"
});

return webpackConfig;
}
};
11 changes: 6 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@
dependencies:
regenerator-runtime "^0.12.0"

"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.2.0":
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.2.0", "@babel/runtime@^7.3.1":
version "7.3.1"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.3.1.tgz#574b03e8e8a9898eaf4a872a92ea20b7846f6f2a"
integrity sha512-7jGW8ppV0ant637pIqAcFfQDDH1orEPGJb8aXfUozuCU3QqX7rX4DA8iwrbPrR1hcH0FTTHz47yQnk+bl5xHQA==
Expand Down Expand Up @@ -1160,11 +1160,12 @@
dependencies:
hoist-non-react-statics "^3.2.0"

"@reactioncommerce/components@^0.62.1":
version "0.62.1"
resolved "https://registry.yarnpkg.com/@reactioncommerce/components/-/components-0.62.1.tgz#48148c3ff9e2cabfe032cde6f159840722a3644e"
integrity sha512-0A5jPvuN5syOr+BRi8SKJIr5pFLdQgno1fK6xn0uArMGi2z5Sffbpv6Xp2HyYcUVSNvjb+xF89FvWIOi0eLZYw==
"@reactioncommerce/components@^0.63.0":
version "0.63.0"
resolved "https://registry.yarnpkg.com/@reactioncommerce/components/-/components-0.63.0.tgz#ae900ef9105363c7fd40c7cb04f9af112d5cd61e"
integrity sha512-eNvyjYA+uRJQwGOTuujMoGWGHJ2enZhnacInDCUM732ZcDFuwpRHpx8PTbrMxgBk7Ig4o86qRmqauoz3g30xTw==
dependencies:
"@babel/runtime" "^7.3.1"
"@material-ui/core" "^3.1.0"
accounting-js "^1.1.1"
lodash.debounce "^4.0.8"
Expand Down

0 comments on commit 712ec6a

Please sign in to comment.