Commit Graph

62 Commits (3d7a74cc2bd08d9a9f16692a3b42eaefb810ab48)

Author SHA1 Message Date
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
Travis Ralston f9fa338960 Merge branch 'develop' into travis/permalink-routing 2018-10-26 09:22:13 -06: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
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
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 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
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