Fix today race condition (#75)
* Move frontend to root * Fix backend issues * Remove old routes * Setup Dockerfile * Fix today /tags multiplt requests issue * Fix race condition on today's inbox widget * Fix cors development issue * Fix CORS for Dockerfile * Fix dockerised settings for infinite loop * Fix translation issues * fixup! Fix translation issues --------- Co-authored-by: Your Name <you@example.com>
This commit is contained in:
parent
9b1e465b83
commit
f9b21dff0a
106 changed files with 2435 additions and 1451 deletions
|
|
@ -1,37 +1,44 @@
|
|||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
|
||||
const isDevelopment = process.env.NODE_ENV !== 'production';
|
||||
|
||||
// Force development mode for hot reloading
|
||||
process.env.NODE_ENV = 'development';
|
||||
|
||||
module.exports = {
|
||||
entry: './app/frontend/index.tsx',
|
||||
entry: './frontend/index.tsx',
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'public/js'),
|
||||
filename: 'bundle.js',
|
||||
publicPath: '/js/',
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: '[name].[contenthash].js',
|
||||
publicPath: '/',
|
||||
clean: true
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.tsx', '.ts', '.js'],
|
||||
},
|
||||
devServer: {
|
||||
static: [
|
||||
{
|
||||
directory: path.join(__dirname, 'public'),
|
||||
publicPath: '/'
|
||||
},
|
||||
{
|
||||
directory: path.join(__dirname),
|
||||
publicPath: '/'
|
||||
}
|
||||
],
|
||||
hot: true,
|
||||
watchFiles: ['app/frontend/**/*'],
|
||||
static: {
|
||||
directory: path.join(__dirname, 'public'),
|
||||
},
|
||||
hot: isDevelopment,
|
||||
watchFiles: isDevelopment ? ['frontend/**/*'] : [],
|
||||
port: 8080,
|
||||
host: '0.0.0.0',
|
||||
historyApiFallback: true,
|
||||
proxy: [{
|
||||
context: ['/api', '/locales'],
|
||||
target: 'http://localhost:9292',
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
cookieDomainRewrite: 'localhost',
|
||||
headers: {
|
||||
'Access-Control-Allow-Origin': '*'
|
||||
},
|
||||
onProxyRes: function(proxyRes, req, res) {
|
||||
proxyRes.headers['Access-Control-Allow-Origin'] = 'http://localhost:8080';
|
||||
proxyRes.headers['Access-Control-Allow-Credentials'] = 'true';
|
||||
}
|
||||
}],
|
||||
// Add middleware to log requests for translation files to help with debugging
|
||||
setupMiddlewares: (middlewares, devServer) => {
|
||||
if (!devServer) {
|
||||
|
|
@ -48,7 +55,12 @@ module.exports = {
|
|||
},
|
||||
plugins: [
|
||||
isDevelopment && new ReactRefreshWebpackPlugin(),
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
isDevelopment && new webpack.HotModuleReplacementPlugin(),
|
||||
new HtmlWebpackPlugin({
|
||||
title: 'Tududi',
|
||||
filename: 'index.html',
|
||||
template: 'public/index.html'
|
||||
}),
|
||||
].filter(Boolean),
|
||||
module: {
|
||||
rules: [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue