]> cat aescling's git repositories - mastodon.git/blob - config/webpack/development.js
Added account featured tags API (#11817)
[mastodon.git] / config / webpack / development.js
1 // Note: You must restart bin/webpack-dev-server for changes to take effect
2
3 const merge = require('webpack-merge');
4 const sharedConfig = require('./shared');
5 const { settings, output } = require('./configuration');
6
7 const watchOptions = {};
8
9 if (process.env.VAGRANT) {
10 // If we are in Vagrant, we can't rely on inotify to update us with changed
11 // files, so we must poll instead. Here, we poll every second to see if
12 // anything has changed.
13 watchOptions.poll = 1000;
14 }
15
16 module.exports = merge(sharedConfig, {
17 mode: 'development',
18 cache: true,
19 devtool: 'cheap-module-eval-source-map',
20
21 stats: {
22 errorDetails: true,
23 },
24
25 output: {
26 pathinfo: true,
27 },
28
29 devServer: {
30 clientLogLevel: 'none',
31 compress: settings.dev_server.compress,
32 quiet: settings.dev_server.quiet,
33 disableHostCheck: settings.dev_server.disable_host_check,
34 host: settings.dev_server.host,
35 port: settings.dev_server.port,
36 https: settings.dev_server.https,
37 hot: settings.dev_server.hmr,
38 contentBase: output.path,
39 inline: settings.dev_server.inline,
40 useLocalIp: settings.dev_server.use_local_ip,
41 public: settings.dev_server.public,
42 publicPath: output.publicPath,
43 historyApiFallback: {
44 disableDotRule: true,
45 },
46 headers: settings.dev_server.headers,
47 overlay: settings.dev_server.overlay,
48 stats: {
49 entrypoints: false,
50 errorDetails: false,
51 modules: false,
52 moduleTrace: false,
53 },
54 watchOptions: Object.assign(
55 {},
56 settings.dev_server.watch_options,
57 watchOptions,
58 ),
59 writeToDisk: filePath => /ocr/.test(filePath),
60 },
61 });
This page took 0.08168 seconds and 4 git commands to generate.