Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Stop importing from nuxt.config.js #547

Merged
merged 1 commit into from
Dec 23, 2021

Conversation

sarayourfriend
Copy link
Contributor

Fixes

Fixes #524 by @sarayourfriend

Description

Stops importing from nuxt.config.js during the runtime. See related issue for the rationale behind this.

Testing Instructions

Run pnpm dev and pnpm storybook and verify that they work as expected. There should be no changes to the behavior of the application.

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • [N/A] I added or updated tests for the changes I made (if applicable).
  • [N/A] I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@sarayourfriend sarayourfriend added 🟨 priority: medium Not blocking but should be addressed soon 🛠 goal: fix Bug fix 💻 aspect: code Concerns the software code in the repository labels Dec 21, 2021
@sarayourfriend sarayourfriend requested a review from a team as a code owner December 21, 2021 17:08
@@ -467,7 +467,7 @@
"facebookLocale": "el_GR",
"wpLocale": "el",
"code": "el",
"translated": 9
"translated": 28
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like the change from #545, should this PR be pointed at that branch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops, I didn't mean to include that file! I'll remove it from the commit.

@sarayourfriend sarayourfriend force-pushed the fix/stop-importing-from-nuxt-config branch from 8d56d6e to 1536996 Compare December 21, 2021 17:13
@sarayourfriend sarayourfriend force-pushed the fix/stop-importing-from-nuxt-config branch from 1536996 to a2a9930 Compare December 21, 2021 18:06
@@ -130,7 +129,6 @@ export default function useI18nSync() {
onMounted(() => {
window.addEventListener('message', localeMsgHandler)
sendWindowMessage({
Copy link
Contributor

@obulat obulat Dec 23, 2021

Choose a reason for hiding this comment

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

Nice way of injecting dev in one place instead of doing it in every function :)

Copy link
Contributor

@obulat obulat left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@dhruvkb dhruvkb left a comment

Choose a reason for hiding this comment

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

LGTM, this is great!

* Default environment variables are set on this key. Defaults are fallbacks to existing env vars.
* All boolean values should be designed to be false by default.
*/
export const env = {
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if there is a performance boost to using Object.freeze on this object literal?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe? I doubt it's a measurable difference though.

@sarayourfriend sarayourfriend merged commit 3b7314b into main Dec 23, 2021
@sarayourfriend sarayourfriend deleted the fix/stop-importing-from-nuxt-config branch December 23, 2021 14:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟨 priority: medium Not blocking but should be addressed soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stop importing nuxt.config.js into the app runtime
4 participants