Anders Kaseorg
79b88b79bb
webpack: Upgrade to Webpack 5.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-14 17:02:03 -07:00
Anders Kaseorg
04075201a0
dependencies: Upgrade webpack-dev-server to 4.2.0.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-13 10:12:43 -07:00
Anders Kaseorg
9f3d1fdbdb
webpack: Fix run-dev.py --minify.
...
‘--optimize-minimize’ no longer exists. (Webpack 5 has
‘--optimization-minimize’.)
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-10 17:26:55 -07:00
Anders Kaseorg
aedc5af351
webpack: Fix CSS source map generation on 1-CPU systems.
...
We were passing a SourceMapGenerator as `map`, but it seems that
css-minimizer-webpack-plugin expects a string, and only implicitly
stringifies it when running with parallelism.
Fixes #18727 .
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-08 15:55:50 -07:00
Anders Kaseorg
ad7466a2bf
dependencies: Upgrade JavaScript dependencies.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-08 10:15:52 -07:00
Anders Kaseorg
bf056c8990
js: Extract password_quality module; remove zxcvbn from globals.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-24 13:08:52 -07:00
Riken Shah
14b01343d9
webpack: Introduce `webpack.dev-asset.json`.
...
This commit will now allow development-only pages to
use development-only packages without breaking the
production build.
2021-04-19 10:31:39 -07:00
Anders Kaseorg
82106faf6c
webpack: Don’t watch node_modules for changes.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-16 14:53:00 -07:00
Anders Kaseorg
b0c07d433f
Revert "templates: Add {{#let}} block helper."
...
This reverts commit f81cc16a0f
(#17999 ).
The {{#tr}} helper now includes the functionality that we wanted from
this.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-13 17:41:10 -07:00
Anders Kaseorg
7947de5cd1
webpack: Set ignoreHelpers for handlebars-loader.
...
We don’t use the helper reference feature of handlebars-loader, so we
might as well not pay for it.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-09 16:26:23 -07:00
Anders Kaseorg
6bc3b267e1
webpack: Switch to css-minimizer-webpack-plugin.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-07 18:43:36 -07:00
Anders Kaseorg
3c41db7f1a
dependencies: Upgrade to webpack-bundle-tracker 1.0.0-alpha.1.
...
This also seems unmaintained, but is, at least, released.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-06 09:31:35 -07:00
Anders Kaseorg
f81cc16a0f
templates: Add {{#let}} block helper.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-05 17:24:09 -07:00
Anders Kaseorg
035299d052
webpack: Prevent Emacs file locks from crashing webpack-dev-server.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-11 13:31:30 -08:00
Anders Kaseorg
d355122c77
Revert "webpack: Disable module concatenation."
...
This reverts commit a6510789c9
.
2021-03-02 17:06:35 -08:00
Anders Kaseorg
79ac5c25b5
zulip_test: Re-export internal functions used by Puppeteer tests.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-02 17:06:35 -08:00
Anders Kaseorg
a6510789c9
webpack: Disable module concatenation.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-02-28 14:23:00 -08:00
Ganesh Pawar
eefa687832
run-dev: Suppress the notices made by third-party tools.
...
This limits the `run-dev.py` startup output.
And made the terminal message a bit more clear about
accessing the server.
Fixes #16846
2021-01-22 18:00:30 -08:00
Anders Kaseorg
710bb4357e
webpack: Remove unused hmr option for mini-css-extract-plugin.
...
This option was removed in mini-css-extract-plugin@1.0.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-12-09 14:48:59 -08:00
Anders Kaseorg
a37616e8c6
eslint: Fix unicorn/import-style.
...
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/import-style.md
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-10-07 16:00:33 -07:00
Anders Kaseorg
f644bf2063
webpack: Use Webpack’s mode option rather than repurposing env.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-09-28 10:57:08 -07:00
Anders Kaseorg
f628282c9e
webpack: Improve comment about devtool.
...
Chrome breakpoints and stack traces work fine with the eval-* options;
all that breaks is that stacktrace-gps can’t extract the source
snippets from the source map with eval-*.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-09-28 10:57:08 -07:00
Anders Kaseorg
b386e6e0f7
webpack: Name the server configuration.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-09-28 10:57:08 -07:00
Anders Kaseorg
9131b4f282
webpack: Include devServer settings unconditionally.
...
These are unused in production but there’s no harm in including them.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-09-28 10:57:08 -07:00
Anders Kaseorg
5006255069
webpack: Use assets object immutably.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-09-28 10:57:08 -07:00
Anders Kaseorg
a3d26d701e
styles: Rename .scss files back to .css.
...
css-loader@4 broke @import statements referencing files with
extensions other than .css, unless those @import statements are
compiled away by another loader. Upstream is more interested in
arguing that such @import statements are semantically incorrect than
applying the one line fix.
https://github.com/webpack-contrib/css-loader/issues/1164
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-09-15 16:33:28 -07:00
Anders Kaseorg
7492656b92
styles: Reference images through Webpack.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-09-15 16:33:28 -07:00
Anders Kaseorg
10bd7a47c4
webpack: Move webpack.config.ts to top level.
...
We lost the war against top level configuration files many moons ago.
This is what developers and tools expect. And it seems to be required
for eslint-import-resolver-webpack (there’s ostensibly a {"config":
"tools/webpack.config.ts"} option, but it doesn’t work correctly:
https://github.com/benmosher/eslint-plugin-import/issues/1861 ).
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-09-01 16:43:02 -07:00