Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e1f67396
Commit
e1f67396
authored
Jul 21, 2020
by
Jake Burden
Committed by
Amy Qualls
Jul 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add documentation about Babel polyfills
Add docs about finding polyfills in webpack report
parent
9db5eb50
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
0 deletions
+32
-0
doc/.vale/gitlab/spelling-exceptions.txt
doc/.vale/gitlab/spelling-exceptions.txt
+2
-0
doc/development/fe_guide/frontend_faq.md
doc/development/fe_guide/frontend_faq.md
+30
-0
doc/development/fe_guide/img/webpack_report_v12_8.png
doc/development/fe_guide/img/webpack_report_v12_8.png
+0
-0
No files found.
doc/.vale/gitlab/spelling-exceptions.txt
View file @
e1f67396
...
...
@@ -308,6 +308,8 @@ Piwik
PgBouncer
plaintext
Poedit
polyfill
polyfills
pooler
PostgreSQL
precompile
...
...
doc/development/fe_guide/frontend_faq.md
View file @
e1f67396
...
...
@@ -163,3 +163,33 @@ To return to the normal development mode:
1.
Run
`yarn clean`
to remove the production assets and free some space (optional).
1.
Start webpack again:
`gdk start webpack`
.
1.
Restart GDK:
`gdk-restart rails-web`
.
### 8. Babel polyfills
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/28837) in GitLab 12.8.
GitLab has enabled the Babel
`preset-env`
option
[
`useBuiltIns: 'usage'`
](
https://babeljs.io/docs/en/babel-preset-env#usebuiltins-usage
)
,
which adds the appropriate
`core-js`
polyfills once for each JavaScript feature
we're using that our target browsers don't support. You don't need to add
`core-js`
polyfills manually.
NOTE:
**Note:**
GitLab still manually adds non-
`core-js`
polyfills for extending browser features
(such as GitLab's SVG polyfill) that allow us reference SVGs by using
`<use xlink:href>`
.
These polyfills should be added to
`app/assets/javascripts/commons/polyfills.js`
.
To see what polyfills are being used:
1.
Navigate to your merge request.
1.
In the secondary menu below the title of the merge request, click
**Pipelines**
, then
click the pipeline you want to view, to display the jobs in that pipeline.
1.
Click the
[
`compile-production-assets`
](
https://gitlab.com/gitlab-org/gitlab/-/jobs/641770154
)
job.
1.
In the right-hand sidebar, scroll to
**Job Artifacts**
, and click
**Browse**
.
1.
Click the
**webpack-report**
folder to open it, and click
**index.html**
.
1.
In the upper left corner of the page, click the right arrow
**{angle-right}**
to display the explorer.
1.
In the
**Search modules**
field, enter
`gitlab/node_modules/core-js`
to see
which polyfills are being loaded and where:
!
[
Image of webpack report
](
img/webpack_report_v12_8.png
)
doc/development/fe_guide/img/webpack_report_v12_8.png
0 → 100644
View file @
e1f67396
46.3 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment