Skip to content

Commit ebc2ad5

Browse files
authored
Merge pull request element-hq#2966 from vector-im/rav/move_bundle_again
Add another layer of directory to webpack chunks
2 parents 205676a + 4a1b04e commit ebc2ad5

5 files changed

Lines changed: 24 additions & 15 deletions

File tree

‎src/skins/vector/css/matrix-react-sdk/views/elements/DirectorySearchBox.css‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ input[type=text].mx_DirectorySearchBox_input:focus {
4646
padding-right: 10px;
4747
background-color: #efefef;
4848
border-radius: 3px;
49-
background-image: url('../img/icon-return.svg');
49+
background-image: url('../../img/icon-return.svg');
5050
background-position: 8px 70%;
5151
background-repeat: no-repeat;
5252
text-indent: 18px;
@@ -63,7 +63,7 @@ input[type=text].mx_DirectorySearchBox_input:focus {
6363
.mx_DirectorySearchBox_clear {
6464
display: inline-block;
6565
vertical-align: middle;
66-
background: url('../img/icon_context_delete.svg');
66+
background: url('../../img/icon_context_delete.svg');
6767
background-position: 0 50%;
6868
background-repeat: no-repeat;
6969
width: 15px;

‎src/skins/vector/css/matrix-react-sdk/views/rooms/RoomTile.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ limitations under the License.
6565
position: absolute;
6666
content: "";
6767
border-radius: 40px;
68-
background-image: url("../img/icons_ellipsis.svg");
68+
background-image: url("../../img/icons_ellipsis.svg");
6969
background-size: 25px;
7070
width: 24px;
7171
height: 24px;

‎src/skins/vector/css/vector-web/fonts.css‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,42 @@
77
*/
88
@font-face {
99
font-family: 'Open Sans';
10-
src: url('../fonts/Open_Sans/OpenSans-Regular.ttf') format('truetype');
10+
src: url('../../fonts/Open_Sans/OpenSans-Regular.ttf') format('truetype');
1111
font-weight: 400;
1212
font-style: normal;
1313
}
1414

1515
@font-face {
1616
font-family: 'Open Sans';
17-
src: url('../fonts/Open_Sans/OpenSans-Italic.ttf') format('truetype');
17+
src: url('../../fonts/Open_Sans/OpenSans-Italic.ttf') format('truetype');
1818
font-weight: 400;
1919
font-style: italic;
2020
}
2121

2222
@font-face {
2323
font-family: 'Open Sans';
24-
src: url('../fonts/Open_Sans/OpenSans-Semibold.ttf') format('truetype');
24+
src: url('../../fonts/Open_Sans/OpenSans-Semibold.ttf') format('truetype');
2525
font-weight: 600;
2626
font-style: normal;
2727
}
2828

2929
@font-face {
3030
font-family: 'Open Sans';
31-
src: url('../fonts/Open_Sans/OpenSans-SemiboldItalic.ttf') format('truetype');
31+
src: url('../../fonts/Open_Sans/OpenSans-SemiboldItalic.ttf') format('truetype');
3232
font-weight: 600;
3333
font-style: italic;
3434
}
3535

3636
@font-face {
3737
font-family: 'Open Sans';
38-
src: url('../fonts/Open_Sans/OpenSans-Bold.ttf') format('truetype');
38+
src: url('../../fonts/Open_Sans/OpenSans-Bold.ttf') format('truetype');
3939
font-weight: 700;
4040
font-style: normal;
4141
}
4242

4343
@font-face {
4444
font-family: 'Open Sans';
45-
src: url('../fonts/Open_Sans/OpenSans-BoldItalic.ttf') format('truetype');
45+
src: url('../../fonts/Open_Sans/OpenSans-BoldItalic.ttf') format('truetype');
4646
font-weight: 700;
4747
font-style: italic;
4848
}
@@ -54,14 +54,14 @@
5454

5555
@font-face {
5656
font-family: 'Fira Mono';
57-
src: url('../fonts/Fira_Mono/FiraMono-Regular.ttf') format('truetype');
57+
src: url('../../fonts/Fira_Mono/FiraMono-Regular.ttf') format('truetype');
5858
font-weight: 400;
5959
font-style: normal;
6060
}
6161

6262
@font-face {
6363
font-family: 'Fira Mono';
64-
src: url('../fonts/Fira_Mono/FiraMono-Bold.ttf') format('truetype');
64+
src: url('../../fonts/Fira_Mono/FiraMono-Bold.ttf') format('truetype');
6565
font-weight: 700;
6666
font-style: normal;
6767
}

‎src/skins/vector/css/vector-web/views/elements/ImageView.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ limitations under the License.
6262
max-height: 100%;
6363
/* object-fit hack needed for Chrome due to Chrome not re-laying-out until you refresh */
6464
object-fit: contain;
65-
/* background-image: url('../img/trans.png'); */
65+
/* background-image: url('../../img/trans.png'); */
6666
pointer-events: all;
6767
}
6868

‎webpack.config.js‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,17 @@ module.exports = {
4040
},
4141
output: {
4242
path: path.join(__dirname, "webapp"),
43-
filename: "[hash]/[name].js",
44-
chunkFilename: "[hash]/[name].js",
43+
44+
// the generated js (and CSS, from the ExtractTextPlugin) are put in a
45+
// unique subdirectory for the build. There will only be one such
46+
// 'bundle' directory in the generated tarball; however, hosting
47+
// servers can collect 'bundles' from multiple versions into one
48+
// directory and symlink it into place - this allows users who loaded
49+
// an older version of the application to continue to access webpack
50+
// chunks even after the app is redeployed.
51+
//
52+
filename: "bundles/[hash]/[name].js",
53+
chunkFilename: "bundles/[hash]/[name].js",
4554
devtoolModuleFilenameTemplate: function(info) {
4655
// Reading input source maps gives only relative paths here for
4756
// everything. Until I figure out how to fix this, this is a
@@ -80,7 +89,7 @@ module.exports = {
8089
}),
8190

8291
new ExtractTextPlugin(
83-
"[hash]/[name].css",
92+
"bundles/[hash]/[name].css",
8493
{
8594
allChunks: true
8695
}

0 commit comments

Comments
 (0)