Skip to content

Commit

Permalink
Bug 1750596 - Moving save to Pocket vendors into their own bundle. r=gvn
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottDowne committed Jan 19, 2022
1 parent df951c6 commit 7c161e7
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 19 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ browser/components/enterprisepolicies/schemas/schema.jsm
browser/components/translation/cld2/
# generated or library files in pocket
browser/components/pocket/content/panels/js/tmpl.js
browser/components/pocket/content/panels/js/vendor.bundle.js
browser/components/pocket/content/panels/js/main.bundle.js

# Ignore newtab files
Expand Down
1 change: 1 addition & 0 deletions browser/components/pocket/content/panels/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<script src="js/vendor/jquery-2.1.1.min.js"></script>
<script src="js/vendor/handlebars.runtime.js"></script>
<script src="js/tmpl.js"></script>
<script src="js/vendor.bundle.js"></script>
<script src="js/main.bundle.js"></script>
<script src="js/home/entry.js"></script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion browser/components/pocket/content/panels/js/main.bundle.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,3 @@ object-assign
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v17.0.2
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v17.0.2
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
2 changes: 2 additions & 0 deletions browser/components/pocket/content/panels/js/vendor.bundle.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/** @license React v17.0.2
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v17.0.2
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
1 change: 1 addition & 0 deletions browser/components/pocket/content/panels/saved.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<script src="js/vendor/handlebars.runtime.js"></script>
<script src="js/vendor/jquery.tokeninput.min.js"></script>
<script src="js/tmpl.js"></script>
<script src="js/vendor.bundle.js"></script>
<script src="js/main.bundle.js"></script>
<script src="js/saved/entry.js"></script>
</body>
Expand Down
1 change: 1 addition & 0 deletions browser/components/pocket/content/panels/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<body class="pkt_ext_containersignup" aria-live="polite">
<script src="js/vendor/handlebars.runtime.js"></script>
<script src="js/tmpl.js"></script>
<script src="js/vendor.bundle.js"></script>
<script src="js/main.bundle.js"></script>
<script src="js/signup/entry.js"></script>
</body>
Expand Down
1 change: 1 addition & 0 deletions browser/components/pocket/jar.mn
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ browser.jar:
content/pocket/panels/saved.html (content/panels/saved.html)
content/pocket/panels/signup.html (content/panels/signup.html)
content/pocket/panels/style-guide.html (content/panels/style-guide.html)
content/pocket/panels/js/vendor.bundle.js (content/panels/js/vendor.bundle.js)
content/pocket/panels/js/main.bundle.js (content/panels/js/main.bundle.js)
content/pocket/panels/js/tmpl.js (content/panels/js/tmpl.js)
content/pocket/panels/js/vendor (content/panels/js/vendor/*)
Expand Down
11 changes: 11 additions & 0 deletions browser/components/pocket/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,15 @@ module.exports = {
resolve: {
extensions: [".js", ".jsx"],
},
optimization: {
splitChunks: {
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/](react|react-dom)[\\/]/,
name: "vendor",
chunks: "all",
},
},
},
},
};

0 comments on commit 7c161e7

Please sign in to comment.