diff options
| author | Ilja <ilja@ilja.space> | 2022-09-24 15:56:27 +0200 |
|---|---|---|
| committer | Ilja <ilja@ilja.space> | 2022-09-24 15:56:27 +0200 |
| commit | 5541d0ec298a9350c151c777886ec70c36856e2d (patch) | |
| tree | cc5104599805a307070b51c4bcd2b38c2985d93e /build/dev-server.js | |
| parent | 650d195f44610b453f1a297499fd103b19e0a855 (diff) | |
| parent | 03b61f0a9cb09a47d2d9bc89c0a08c62b70c12e2 (diff) | |
Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma-fe into fine_grained_moderation_privileges
Diffstat (limited to 'build/dev-server.js')
| -rw-r--r-- | build/dev-server.js | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/build/dev-server.js b/build/dev-server.js index c06192bd..e51ba948 100644 --- a/build/dev-server.js +++ b/build/dev-server.js @@ -10,6 +10,9 @@ var webpackConfig = process.env.NODE_ENV === 'testing' ? require('./webpack.prod.conf') : require('./webpack.dev.conf') +var updateEmoji = require('./update-emoji').updateEmoji +updateEmoji() + // default port where dev server listens for incoming traffic var port = process.env.PORT || config.dev.port // Define HTTP proxies to your custom API backend @@ -29,18 +32,20 @@ var devMiddleware = require('webpack-dev-middleware')(compiler, { }) var hotMiddleware = require('webpack-hot-middleware')(compiler) + +// FIXME: The statement below gives error about hooks being required in webpack 5. // force page reload when html-webpack-plugin template changes -compiler.plugin('compilation', function (compilation) { - compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) { - // FIXME: This supposed to reload whole page when index.html is changed, - // however now it reloads entire page on every breath, i suppose the order - // of plugins changed or something. It's a minor thing and douesn't hurt - // disabling it, constant reloads hurt much more +// compiler.plugin('compilation', function (compilation) { +// compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) { +// // FIXME: This supposed to reload whole page when index.html is changed, +// // however now it reloads entire page on every breath, i suppose the order +// // of plugins changed or something. It's a minor thing and douesn't hurt +// // disabling it, constant reloads hurt much more - // hotMiddleware.publish({ action: 'reload' }) - // cb() - }) -}) +// // hotMiddleware.publish({ action: 'reload' }) +// // cb() +// }) +// }) // proxy api requests Object.keys(proxyTable).forEach(function (context) { @@ -48,7 +53,7 @@ Object.keys(proxyTable).forEach(function (context) { if (typeof options === 'string') { options = { target: options } } - app.use(proxyMiddleware(context, options)) + app.use(proxyMiddleware.createProxyMiddleware(context, options)) }) // handle fallback for HTML5 history API |
