Commit Graph

8 Commits

Author SHA1 Message Date
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