Webpack: fix devServer with subdirectory
This commit is contained in:
parent
5eafa61760
commit
46baa4119f
1 changed files with 4 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
// Note: You must restart bin/webpack-dev-server for changes to take effect
|
||||
console.log('Running in development mode'); // eslint-disable-line no-console
|
||||
|
||||
const { join } = require('path');
|
||||
const { merge } = require('webpack-merge');
|
||||
const sharedConfig = require('./shared');
|
||||
|
||||
|
@ -10,6 +11,8 @@ const backendUrl = process.env.BACKEND_URL || 'http://localhost:4000';
|
|||
const patronUrl = process.env.PATRON_URL || 'http://localhost:3037';
|
||||
const secureProxy = !(process.env.PROXY_HTTPS_INSECURE === 'true');
|
||||
|
||||
const { FE_SUBDIRECTORY } = require(join(__dirname, '..', 'app', 'soapbox', 'build_config'));
|
||||
|
||||
const backendEndpoints = [
|
||||
'/api',
|
||||
'/pleroma',
|
||||
|
@ -76,6 +79,7 @@ module.exports = merge(sharedConfig, {
|
|||
hot: false,
|
||||
historyApiFallback: {
|
||||
disableDotRule: true,
|
||||
index: join(FE_SUBDIRECTORY, '/'),
|
||||
},
|
||||
headers: {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
|
|
Loading…
Reference in a new issue