Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove any external linked javascript dependency #101

Merged
merged 15 commits into from
Apr 22, 2021
Merged

Remove any external linked javascript dependency #101

merged 15 commits into from
Apr 22, 2021

Conversation

Wawrzyn321
Copy link
Contributor

@Wawrzyn321 Wawrzyn321 commented Apr 20, 2021

Description

Changes proposed in this pull request:

  • Reorganize statically served external libraries into libs/ folder
  • Serve js-yaml from core
  • About the monaco-editor... we can't link it during the build time (more here), and it's located in shared/. Seeing that I went for symbolic link to the vs/ folder (monaco core installed in shared) that would be resolved during runtime. I had to add a SHA for inline script added by Monaco's loader.
BTW I do know what "internalize" means

Related issue(s)

@Wawrzyn321
Copy link
Contributor Author

/test pre-busola-core-ui

@Wawrzyn321 Wawrzyn321 marked this pull request as ready for review April 21, 2021 15:39
@dariadomagala-sap dariadomagala-sap self-assigned this Apr 22, 2021
Copy link
Contributor

@dariadomagala-sap dariadomagala-sap left a comment

Choose a reason for hiding this comment

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

running npm run bootstrap generated 10+ files that were not included in the gitignore

@@ -37,6 +37,7 @@
"caniuse-lite": "^1.0.30001081",
"jsoneditor": "^8.6.1",
"jwt-decode": "^3.1.2",
"monaco-editor": "^0.23.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we use monaco-editor here and monaco-editor/react in main package.json? Those are 2 different libraries and all our dependencies in the code use monaco-editor/react.

Copy link
Contributor

Choose a reason for hiding this comment

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

Additionally, we use monaco-editor/react not only in shared, but also in core-ui. It would make more sense to put it in the main package.json

@@ -7,7 +7,7 @@
"test:watch": "jest --watch",
"build": "webpack --env.production",
"start:kyma": "webpack --env.development --watch",
"build:npx": "echo no-op, done during bootstrap"
"build:npx": "ln -sf ../shared/node_modules/monaco-editor/min/vs ../backend/vs"
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need ../shared part in ../shared/node_modules/monaco-editor/min/v?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, when in my infinite naivety I tried to do ln -s node_modules/monaco-editor/min/vs ../backend/vs, it created a symlink in valid target directory, but didn't take the path into account, so it tried to link busola/backend/node_modules/monaco....

Wawrzyn321 and others added 3 commits April 22, 2021 08:59
ranch 'internalize-external-dependencies' of github.com:Wawrzyn321/busola into internalize-external-dependencies
@Wawrzyn321 Wawrzyn321 merged commit 47df054 into kyma-project:main Apr 22, 2021
@Wawrzyn321 Wawrzyn321 deleted the internalize-external-dependencies branch April 22, 2021 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants