Commit Graph

261 Commits

Author SHA1 Message Date
Germain Souquet
f06eb14c48 Linter recommendations 2021-04-15 15:15:48 +01:00
Travis Ralston
4eb7c1bc00 Add docs for where the worker comes from 2021-03-23 18:29:26 -06:00
su-ex
c9f2e48d56
Merge remote-tracking branch 'upstream/master' into sc 2021-03-20 03:09:20 +01:00
Travis Ralston
cd2dda268f Add webpack config for opus-recorder worker 2021-03-16 22:58:50 -06:00
Travis Ralston
e2ce4239bd Improve docs for customisations
The new regex considers Windows as an OS, and the added array helps reduce merge conflicts for the future.
2021-03-09 14:17:51 -07:00
su-ex
33dcbf4624
Merge remote-tracking branch 'upstream/master' into sc 2021-02-16 13:15:33 +01:00
Michael Telatynski
97925a6ad9 Iterate SpacePanel, fix tooltips and give consistent expanded states 2021-01-29 09:16:55 +00:00
su-ex
f647f3e428
Merge remote-tracking branch 'upstream/master' into sc 2020-12-21 19:19:03 +01:00
su-ex
e7f3fb9254
Replace opengraph og:image 2020-12-20 02:11:42 +01:00
J. Ryan Stinnett
c667473258 Improve asset path for KaTeX fonts
This adjusts our asset path handling to group KaTeX fonts in a more sensible way
alongside the other fonts we have. It also resolves production build issues on
Windows.

Fixes https://github.com/vector-im/element-web/issues/15911
2020-12-09 17:03:55 +00:00
J. Ryan Stinnett
1a635f6bf0 Include KaTeX CSS as a dependency
This changes the KaTeX CSS inclusion to function just like the other bits of the
CSS that we import from dependencies.
2020-12-02 14:58:56 +00:00
J. Ryan Stinnett
d8e0ea5791 Include KaTeX CSS as a dependency
This changes the KaTeX CSS inclusion to function just like the other bits of the
CSS that we import from dependencies.
2020-11-27 12:18:24 +00:00
J. Ryan Stinnett
301ea6a5f3
Merge pull request #15277 from akissinger/katex
added katex.min.css to webpack for math support (main PR in matrix-react-sdk)
2020-11-27 11:55:56 +00:00
Aleks Kissinger
e743a12f30 matched setting name to PR in matrix-react-sdk 2020-11-26 17:40:14 +00:00
J. Ryan Stinnett
f1e89bf833 Replace various instances of Riot with Element 2020-11-25 17:01:19 +00:00
Michael Telatynski
cfee4c925a Revert "Attempt to fix tests some more"
This reverts commit c76a5f2c

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-10-01 14:05:07 +01:00
Michael Telatynski
1edbe36547 Revert "Tidy up Service Worker, only run Workbox in production"
This reverts commit c47532fe

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-10-01 14:04:32 +01:00
Michael Telatynski
87c42934ea Revert "Disable workbox when running in webpack dev server, not in dev mode"
This reverts commit 11e676ce

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-10-01 14:04:21 +01:00
Michael Telatynski
11e676cee0 Disable workbox when running in webpack dev server, not in dev mode
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-09-30 17:35:12 +01:00
Aleks Kissinger
a40cc4fa3e added katex.min.css to webpack for math support 2020-09-24 18:27:57 +01:00
Michael Telatynski
c47532fe2a Tidy up Service Worker, only run Workbox in production
Moves ServiceWorker load into Platform so its not done by Electron

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-09-24 13:01:34 +01:00
Michael Telatynski
c76a5f2c52 Attempt to fix tests some more 2020-09-15 13:19:47 +01:00
J. Ryan Stinnett
3f0de699f0 Clean up comments around Webpack modes 2020-07-17 14:57:48 +01:00
J. Ryan Stinnett
8ae4298637 Webpack modes also manage NODE_ENV
We don't need to manually define `NODE_ENV` in the Webpack config, nor do we
need to set it outside Webpack with `cross-env` either, as Webpack's modes will
take care of this for us.
2020-07-17 14:18:08 +01:00
Bruno Windels
29a1862912 rename element theme to light/dark to apply old prefs 2020-07-14 18:40:57 +02:00
David Baker
d0f81b26ad Change logos excluding vector-icons 2020-07-10 19:09:52 +01:00
Bruno Windels
bc57e6fd70 dark theme 2020-07-09 14:47:42 +02:00
Bruno Windels
c9c402310a element theme webpack config 2020-06-30 13:28:24 +02:00
Michael Telatynski
99df2d3126 Fix postcss order to allow mixin variables to work
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-14 18:46:16 +01:00
Zoe
22704382fe Merge branch 'develop' into foldleft/12014-big-previews-2 2020-05-11 10:19:09 +01:00
Zoe
cbdb2ec9a6 import image to package for use 2020-05-07 10:39:02 +01:00
Zoe
5dd452bec0 use a different image in previews 2020-05-04 11:42:09 +01:00
Zoe
0e75b1b0db
Merge pull request #13357 from vector-im/foldleft/decoder-ring
Developer tool: convert rageshake error locations back to sourcecode locations
2020-05-01 09:37:51 +01:00
Zoe
3e77418fd7 Turn on source mapping, copy decoder-ring over to bundle 2020-04-23 17:55:21 +01:00
Michael Telatynski
b7fa8a1f54 wire up the static fallback error pages
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-23 13:37:25 +01:00
Michael Telatynski
b647e35c48
Merge pull request #13049 from vector-im/t3chguy/default_home
Add new default home page fallback
2020-04-07 14:47:01 +01:00
Michael Telatynski
e58cd1f73a Add new default home page fallback
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-07 10:48:56 +01:00
Michael Telatynski
b1575524aa Switch things to typescript, use @types/modernizr, fix global.d.ts. Move mobile_guide redirect to index.ts
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-05 00:55:36 +01:00
Michael Telatynski
b09b47543b Merge branches 'develop' and 't3chguy/app_load_tweaks' of github.com:vector-im/riot-web into t3chguy/app_load_tweaks 2020-03-25 12:45:10 +00:00
Michael Telatynski
a808d26764 Enable webpack reuseExistingChunk
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-03-25 12:41:33 +00:00
Michael Telatynski
0620da4351 Add webpack stats which will be used by CI and stored to artifacts
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-03-23 12:07:26 +00:00
Travis Ralston
e1eb16ce46 Use a local widget wrapper for Jitsi calls
Effectively fixes https://github.com/vector-im/riot-web/issues/11074
Effectively fixes https://github.com/vector-im/riot-web/issues/7112
Fixes https://github.com/vector-im/riot-web/issues/6930
Fixes Jitsi widgets not working for guests (https://github.com/vector-im/riot-web/issues/8933)
Fixes https://github.com/vector-im/riot-web/issues/5048

Previously we were relying on an integration manager to be defined, functional, and alive in order to join Jitsi calls. This commit changes this so we aren't reliant on an integration manager for Jitsi calls at all, and gives people the option of choosing a Jitsi server via the config.json.

This side is just the wrapper/shell: the logic is mostly in the react-sdk (to be linked via PRs). This layer simply has an HTML file exported that can be used to render a Jitsi widget, and the react-sdk constructs a URL to access it locally. This is similar to how the mobile apps handle Jitsi widgets: instead of iframing the widget URL directly into the app, they pull apart the widget information and natively render it. We're effectively doing the same here by parsing the widget options and using our local wrapper instead of whatever happens to be defined in the widget state event.

Integration managers should still continue to offer a widget URL for Jitsi widgets as this is what the spec requires.

A large part of this is based upon Dimension's handling of Jitsi and widgets in general: a license has been granted to allow Riot (and therefore the react-sdk) to use the code and be inspired by it.
2020-03-18 15:48:02 -06:00
Travis Ralston
f44694ad44 Support TypeScript for React components
Same treatment as https://github.com/matrix-org/matrix-react-sdk/pull/4203
2020-03-11 18:19:03 -06:00
Michael Telatynski
56f9149e84 update webpack paths
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-02-13 17:00:17 +00:00
Michael Telatynski
7664eb27c4 Move bulk to react-sdk and reference it from riot-web land
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-02-13 16:58:28 +00:00
Michael Telatynski
0c62db3615 revert webpack changes 2020-02-07 22:09:41 +00:00
Michael Telatynski
98773df76e Get rid of dependence on usercontent.riot.im 2020-02-07 22:07:30 +00:00
J. Ryan Stinnett
4c4f885f25 Change to minimal Webpack output
This changes Webpack to only output errors, warnings, or new compilations.
This has the effect of hiding the massive list of modules. The giant list was
actually _hiding_ warnings because they appear first and scroll off the
terminal.
2020-01-24 22:34:15 +00:00
David Baker
6835f6054b path.resolve does joining too so path.join is redundant 2020-01-21 10:16:32 +00:00
Travis Ralston
932c221548 Fix webpack config (by stealing Dave's config)
Without doing something like this it's hard to use `yarn link`ed resources.
2020-01-20 18:10:06 -07:00
David Baker
42743c3ead Third try at fixing build 2020-01-20 18:20:41 +00:00
David Baker
5d8d5d70d0 Fix build to not babel modules inside js/react sdk
Adds 'src' to react-sdk & js-sdk babel test path so we don't run node
modules inside js & react sdk through babel
2020-01-20 18:00:38 +00:00
David Baker
922ed597d6 Fix webpack to babel js-sdk & react-sdk but no other deps
This was happening implicitly in our dev setups and the CI build
because of the comment on the last line.
2020-01-20 16:55:07 +00:00
Travis Ralston
fb9503199d Don't calculate sourcemaps in production 2020-01-16 11:55:54 -07:00
Travis Ralston
bb931e25d8 Make sourcemaps legible by humans 2020-01-16 11:47:16 -07:00
Travis Ralston
69d49f9881 Fix indentation of webpack config 2020-01-16 11:33:55 -07:00
Travis Ralston
4e37f8aa88 Merge branch 'develop' into travis/fix-ci 2020-01-16 09:25:10 -07:00
Travis Ralston
ae010ef649 Convert babel config to JS for Jest to pick up 2020-01-15 13:00:11 -07:00
Travis Ralston
909fddb732 Don't minifiy builds of develop through CI packaging
Fixes https://github.com/vector-im/riot-web/issues/11864

This uses an environment variable because the build script assumes you want a production build, but we don't for this particular script. To avoid having a mess of NPM scripts to worry about, we'll just pass a flag down.
2020-01-15 12:19:45 -07:00
Travis Ralston
1cd9c4ff11 Move babel config out to its own file
For reasons described within this diff.
2020-01-08 16:01:28 -07:00
Travis Ralston
203c9c8a7d Don't use so many extensions 2020-01-08 15:11:23 -07:00
Travis Ralston
37a83d469c Add giant comment about why we're runnign CSS through PostCSS 2020-01-08 14:56:40 -07:00
Travis Ralston
1b41dc3291 Make the webpack config work for us
This moves the babel and postcss configs into the webpack config for ease of maintenance (and because we need variations of them). The typescript config is left outside the webpack config for IDEs to pick it up.
2019-12-23 19:51:01 -07:00
Bruno Windels
4273f2cc55 add support for dark custom theme 2019-10-01 17:01:16 +02:00
Bruno Windels
5ead6554b3 add new theme to build 2019-09-30 11:00:14 +02:00
Michael Telatynski
06e7a48aaf Switch to React 16.8
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-08-01 15:31:33 +01:00
J. Ryan Stinnett
95d36c1f29 Fix Twemoji loading on Windows dev machines
This corrects our path handling on Windows development machines for
paths referenced in JS and HTML files. Both images and fonts (like
Twemoji) were afflicted (with Windows-style backslash path delimiters),
but browsers seems to tolerate them in the `src` attribute of images, so
we didn't notice that variant before.
2019-05-28 14:31:42 +01:00
Matthew Hodgson
3e17e9f00d tell webpack about woff & woff2 files 2019-05-19 16:09:47 +01:00
J. Ryan Stinnett
1312ba537a Update scripts and docs to use yarn where appropriate
Most `npm` operations are replaced with `yarn`, which generally has better
behavior. However, steps like publish that write to the NPM registry are left to
`npm`, which currently handles these tasks best.
2019-03-12 11:06:57 +00:00
David Baker
bf1ab7f420 Use $webapp rather than Webapp 2019-03-01 12:03:19 +00:00
David Baker
53e25ff247 Set a resuire alias for the webapp directory
So languagehandler can pull the languages json from there
2019-03-01 11:32:37 +00:00
Bruno Windels
6a9c053536 simplify config entry 2019-02-20 09:39:42 +01:00
Bruno Windels
c2d14392b2 allow setting the relative location of the language file for running the unit tests in ci, where riot-web is a subdirectory of react-sdk 2019-02-18 17:26:49 +01:00
Bruno Windels
223d8a87ca move relative path in react-sdk to webpack config file
otherwise react-sdk can't build anymore with riot-web
in a specific location
2019-02-18 16:25:19 +01:00
Bruno Windels
070cc77e0f add content hash to languages.json file using webpack file-loader 2019-02-18 16:12:04 +01:00
Bruno Windels
2e60037d9f add cache busting for app icons and msapp config xml 2019-02-15 16:11:33 +01:00
J. Ryan Stinnett
0cb35ad216 Rename dharma theme to light theme 2019-02-13 10:47:51 +00:00
J. Ryan Stinnett
7b9de1dbf2 Remove Status theme 2019-02-13 10:47:51 +00:00
J. Ryan Stinnett
745f43a959 Enable building dark theme 2019-02-13 10:47:51 +00:00
J. Ryan Stinnett
8a5b96313a Remove light theme, mark dharma primary 2019-02-13 10:47:51 +00:00
J. Ryan Stinnett
8bac9efd4c Update Riot logo 2019-02-01 13:04:48 -06:00
J. Ryan Stinnett
3fad360f5f Revert "empirically if we want sourcemaps which work for dev we need eval-source-map"
This change causes Node to crash during builds in some configurations.  It also
grows the production bundle size to ~4x what it was before.

This reverts commit 9f4ce2dcf2.
2019-01-31 17:03:16 -06:00
Matthew Hodgson
9f4ce2dcf2 empirically if we want sourcemaps which work for dev we need eval-source-map 2019-01-31 23:30:22 +01:00
David Baker
03de7f9901 Cache-bust olm.wasm
In the same way as we now do images/fonts
2019-01-28 14:09:28 +00:00
Aaron Raimist
d0c503d6c8
Completely disable other themes for now (#8277)
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2019-01-27 21:28:30 -06:00
J. Ryan Stinnett
0802aaae91 Convert slashes in public paths 2019-01-18 17:54:16 -06:00
J. Ryan Stinnett
cf0b2816c1 Only CSS references need to traverse
The path adjustment for assets in bundles is only needed with CSS files.  Paths
referenced in JS files are written to elements, where they are relative to the
document.
2019-01-18 15:59:29 -06:00
J. Ryan Stinnett
7418815637 Fix some path math on Windows 2019-01-18 15:59:29 -06:00
J. Ryan Stinnett
7a3df1c7d6 Support image URLs in HTML templates
Expands the image build process to also support the right paths when used in
HTML templates.
2019-01-18 08:39:16 -06:00
J. Ryan Stinnett
49be03e845 Process images with Webpack
This adds a `file-loader` rule to the Webpack build so that any requests for
image resource will be output into the app's output directory, but with an extra
content has appended so that we can safely use a long cache lifetime.

The CSS and SCSS rules are also changed to use `css-loader` so that any `url`
inside is automatically processed by the new image rule above.
2019-01-18 08:39:09 -06:00
David Baker
373c587ef8
Merge pull request #8003 from vector-im/develop
Merge develop into experimental
2019-01-03 18:56:03 +00:00
David Baker
19f1489c92 Run the Desktop app in a sandbox
* Turn off node integration in the electron renderer process
 * Enable the chromium sandbox to put the renderer into its own process
 * Expose just the ipc module with a preload script
 * Introduce a little IPC call wrapper so we can call into the
   renderer process and await on the result.
 * Use this in a bunch of places we previously used direct calls
   to electron modules.
 * Convert other uses of node, eg. use of process to derive the
   platform (just look at the user agent)
 * Strip out the desktopCapturer integration which doesn't appear
   to have ever worked (probably best to just wait until
   getDisplayMedia() is available in chrome at this point:
   https://github.com/vector-im/riot-web/issues/4880).
2018-12-18 17:42:55 +00:00
Bruno Windels
c7c271fb01 Merge branch 'develop' into experimental 2018-11-21 10:38:16 +00:00
Travis Ralston
36cc5de0e7 Remove the request-only stuff we don't need anymore
This was introduced in https://github.com/matrix-org/matrix-react-sdk/pull/2250 but can be pulled out due to https://github.com/matrix-org/matrix-js-sdk/pull/770. See https://github.com/vector-im/riot-web/issues/7634 for more information about the future.
2018-10-31 13:05:36 -06:00
Bruno Windels
ade0f34c6f Merge branch 'develop' into experimental 2018-10-31 14:36:43 +01:00
Travis Ralston
f9fa338960 Merge branch 'develop' into travis/permalink-routing 2018-10-26 09:22:13 -06:00
Bruno Windels
18daa186b0 Merge branch 'develop' into experimental 2018-10-26 15:33:57 +02:00
Travis Ralston
e4025f1aff Mock fs, tls, and net to support request in the browser
fs is mocked using memfs, which needs to be installed at all 3 layers because webpack is silly
2018-10-24 16:59:14 -06:00
Bruno Windels
eed9c56c51 Merge branch 'develop' into matthew/dharma 2018-10-11 09:56:07 +02:00
David Baker
e277d02f83 Merge remote-tracking branch 'origin/develop' into dbkr/wasm 2018-10-05 14:04:43 +01:00
David Baker
4e6f48df03 Disable webpack-dev-server auto reload
As per comment
2018-10-05 13:56:37 +01:00
David Baker
30f0a7932b Merge remote-tracking branch 'origin/develop' into dbkr/wasm 2018-10-02 16:58:31 +01:00
Bruno Windels
aac40c8c58 Merge branch 'develop' into matthew/dharma 2018-09-28 16:52:38 +02:00
David Baker
1f34d2d644 Kill off olm-loader
Now that Olm needs to be inited asynchronously anyway, we can just
pass the options to Olm.init(), and as long as we do that before we
start the js-sdk, we're all good.

This will means the olm js is now part of the main bundle but since
it's now just a wrapper around the wasm, this is probably faster.

Also add the directwatch flag to olm.wasm because otherwise it
doesn't seem to copy the file in watch mode...
2018-09-26 16:44:52 +01:00
Matthew Hodgson
c57c653535 Merge branch 'develop' into matthew/webpack4 2018-09-26 00:15:56 +01:00
Bruno Windels
23569705b4 Merge branch 'develop' into matthew/dharma 2018-09-21 12:55:40 +02:00
Bruno Windels
8639b2858b dont load the mobileguide script in riot 2018-09-05 16:07:44 +02:00
David Baker
9c8ef4240c Instructions for installing mobile apps
Replace the native js dialog with a page telling you how to
download the apps and how to set your HS URL.
2018-09-03 20:38:30 +01:00
David Baker
57999b460b Didn't mean to commit that file 2018-09-03 13:05:58 +01:00
David Baker
e2bad5bdc8 Tidy up index.js
Non-functional changes (before I start messing with it).

Switch to import, move code out of the top level, switch to one
consistent way of declaring functions, keep imports at the top.
2018-09-03 13:01:52 +01:00
Matthew Hodgson
3c6d87b52b add skin 2018-05-25 16:31:22 +01:00
MTRNord
9063a96629
Specify the path to the postcss config and remove the include arrays as they caused multiple issues on linux 2018-05-11 19:48:33 +02:00
MTRNord
6e922166e7
Fix css paths that got changed from matrix-react-sdk to riot-web 2018-05-11 19:24:18 +02:00
MTRNord
f94abb5611
Fix naming inside the comment 2018-05-11 19:15:48 +02:00
David Baker
8f4953c182
Merge branch 'develop' into webpack4 2018-05-11 16:27:50 +01:00
Luke Barnard
c56b54eddd Load babel-polyfill in the bundle entry, before index.js 2018-04-27 15:12:16 +01:00
Luke Barnard
9b055171ab Enforce loading babel-polyfill first
This is to avoid loading anything before loading the polyfill, otherwise
we risk loading dependencies (such as React) before it.

This was causing the compatibility page to fail somehow.

See https://github.com/facebook/react/issues/8379

Fixes https://github.com/vector-im/riot-web/issues/6562
2018-04-27 13:32:09 +01:00
MTRNord
d69084f31e
Fix builld:dev build by using raw-loader instead css-raw-loader 2018-04-27 12:02:00 +02:00
MTRNord
02a185f2fe
Update Webpack to version 4 2018-04-27 11:32:59 +02:00
Matthew Hodgson
a46b718b4a copy resources from their new locations 2018-04-13 01:49:52 +01:00
Matthew Hodgson
534155fcd5 point to new CSS locations 2018-04-13 00:43:15 +01:00
Matthew Hodgson
41d6995da4 fix braindead typo 2018-04-12 21:59:55 +01:00
David Baker
96f374ed69 Remove og:image with status.im URL
And make it configurable, albeit only at buuld time, as hopefully
explained in the README.
2018-03-14 18:34:26 +00:00
Matthew Hodgson
01b3d6128c move status theme into a dedicated dir, and make fonts work 2017-10-22 17:03:39 +01:00
Matthew Hodgson
cd31e6532b initial wip theme 2017-10-20 18:43:06 +01:00
Richard van der Hoff
e868dbbb94 No need to make olm an external (#4139)
matrix-js-sdk now loads olm from global.Olm instead of requiring it
(https://github.com/matrix-org/matrix-js-sdk/pull/446), so we no longer need to
define it as an external.
2017-06-01 15:46:37 +01:00
Michael Telatynski
08fb20a0df use a character class for brevity
add a comment so this madness has meaning

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-04-22 14:02:18 +01:00
Michael Telatynski
dd7f9e2d5f argh, fix eslint false positives
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-04-21 19:00:24 +01:00
Michael Telatynski
9b38a97110 Fix Webpack conf
+ conform to a bit more eslint (IDE makes my eyes hurt)
+ specify windows-specific copies of noParse regexes to stop the olm error

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-04-21 15:09:45 +01:00
David Baker
f187a359e6 Add support for indexeddb sync in webworker 2017-04-06 11:15:14 +01:00
Richard van der Hoff
b20f6ff8c1 Silence webpack dev server
Configure the dev server not to spew module lists all over the console.

(Arguably the fact our module list is so long that I have to do this is a bug,
but my life is too short)
2017-02-03 11:40:07 +00:00
Richard van der Hoff
c3fa6ff805 Use the postcss-webpack-loader
Use postcss-webpack-loader instead of webpack-cli to process the scss. Doing so
mostly means that we avoid the problem that webpack-dev-server fails to start
if we haven't already built the CSS. (It also simplifies package.json somewhat,
which is no bad thing)
2017-01-19 02:48:17 +00:00
Matthew Hodgson
14eec6d982 Merge branch 'develop' into matthew/postcss 2017-01-18 12:44:42 +00:00
Matthew Hodgson
6c88201e23 use ye olde rel='alternate stylesheets' for theming 2017-01-17 19:14:16 +00:00
Richard van der Hoff
4a1b04e57b Add another layer of directory to webpack chunks 2017-01-17 12:00:20 +00:00
Richard van der Hoff
b3bff92cc2 Put parent build hash in webpack output filenames
In order to better support a world where old build artifacts are available
(which is necessary to support bundle.js splitting), collect all the webpack
artifacts for the build into a single directory. Then we'll be able to clear
out old builds after a few weeks, knowing they won't be in use any more.
2017-01-16 18:01:25 +00:00
Matthew Hodgson
691fe611d6 experimental postcss 2017-01-10 11:06:09 +00:00
Matthew Hodgson
bacb284415 basic jig for SASS-based themed CSS (one bundle per theme) 2016-12-28 02:01:28 +00:00
Richard van der Hoff
8be72e6c27 Configure olm memory size
16M is somewhat excessive: configure olm to use a bit less.

Requires changes to the olm library to do anything useful, but will be harmless
without them.

Partial fix to vector-im/riot-web#2726.
2016-12-14 11:59:37 +00:00
Richard van der Hoff
67c882648f Make sure we only pack one copy of react-dom (#2603)
Fixes https://github.com/vector-im/vector-web/issues/2601
2016-11-18 17:52:44 +00:00
David Baker
5b7f629996 Build to the 'webapp' directory instead
People may have config files in vector/ so it would be nonideal
if we started overwriting them / blowing them away.
2016-11-08 15:46:21 +00:00
David Baker
527c390152 Merge remote-tracking branch 'origin/develop' into dbkr/electron_3 2016-11-03 15:35:45 +00:00
Richard van der Hoff
ff462580b0 Use webpack-dev-server instead of http-server
Advantages:
 * blocks while a rebuild is in progress so you're less likely to reload the
   old version

 * serves from memory rather than disk, so we no longer need to turn off the
   cachebuster to avoid filling the disk with bundles. Empirically, seems to
   last a plausible amount of time without OOMing; there's no real reason to
   believe it would use any more memory than webpack itself.

 * That in turn means we no longer need the hack to stop chrome caching old
   sourcemaps (because the sourcemap now has a cachebuster in its name).

 * one fewer process for parallelshell to (fail to) manage.

 * in future, we could consider the fancy hot-reload functionality.
2016-11-03 15:08:55 +00:00
David Baker
caa3cb7d89 Electron support
From https://github.com/vector-im/vector-web/pull/2511 but with
just the actual electron changes
2016-11-02 18:49:28 +00:00
Richard van der Hoff
a86f2720bc Avoid errors if olm is missing
If olm isn't installed, webpack prints out scary warnings (though it still
actually succeeds). Let's avoid scaring people by quietly removing it from the
list of things to process.
2016-10-27 10:16:10 +01:00
Richard van der Hoff
31ed719df1 webpack: Improve comment on HtmlWebpackPlugin 2016-10-26 16:52:26 +01:00
Richard van der Hoff
6396c60645 Put a cachebuster in the names of CSS and JS files
This means that clients can do better caching of assets, as it will mean we are
no longer reliant on etags to ensure that clients get a fresh version.

We inhibit the cachebuster for `npm start`, so that we don't get millions of
copies of the bundles on dev boxes.
2016-10-26 15:20:59 +01:00
Richard van der Hoff
fcf683c8a7 Use webpack to copy olm.js
Rather than copying olm.js ourselves in package.json, get webpack to do it for
us by declaring it as a second entry point.
2016-10-26 14:29:21 +01:00
Richard van der Hoff
51b74251f9 Exclude olm from the webpack
Olm takes *ages* to webpack, and it doesn't compress well. So, serve it as a
separate asset to the browser.
2016-08-02 12:44:23 +01:00
Richard van der Hoff
ef4b604caf webpack: always use the olm from vector-web
Fixes an error when matrix-js-sdk is symlinked into node_modules, which meant
that we would (try to) use the version of olm from js-sdk instead of
vector-web (https://github.com/vector-im/vector-web/issues/1765).
2016-07-12 23:10:53 +01:00