mirror of
https://github.com/ansible/awx.git
synced 2026-02-01 01:28:09 -03:30
initial commit
This commit is contained in:
63
webpack.config.js
Normal file
63
webpack.config.js
Normal file
@@ -0,0 +1,63 @@
|
||||
const webpack = require('webpack');
|
||||
|
||||
const TARGET = 'https://localhost:443';
|
||||
const TARGET_PORT = 443;
|
||||
|
||||
module.exports = {
|
||||
entry: './src/index.js',
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.(js|jsx)$/,
|
||||
exclude: /node_modules/,
|
||||
use: ['babel-loader']
|
||||
}
|
||||
]
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['*', '.js', '.jsx']
|
||||
},
|
||||
output: {
|
||||
path: __dirname + '/dist',
|
||||
publicPath: '/',
|
||||
filename: 'bundle.js'
|
||||
},
|
||||
plugins: [
|
||||
new webpack.HotModuleReplacementPlugin()
|
||||
],
|
||||
devServer: {
|
||||
contentBase: './dist',
|
||||
hot: true,
|
||||
inline: true,
|
||||
stats: 'minimal',
|
||||
host: '127.0.0.1',
|
||||
https: true,
|
||||
port: 3000,
|
||||
clientLogLevel: 'none',
|
||||
proxy: [
|
||||
{
|
||||
context: '/api/login/',
|
||||
target: TARGET,
|
||||
secure: false,
|
||||
ws: false,
|
||||
headers: {
|
||||
Host: `localhost:${TARGET_PORT}`,
|
||||
Origin: TARGET,
|
||||
Referer: `${TARGET}/`
|
||||
}
|
||||
},
|
||||
{
|
||||
context: '/api',
|
||||
target: TARGET,
|
||||
secure: false,
|
||||
ws: false,
|
||||
bypass: req => (req.originalUrl.includes('hot-update.json') || req.originalUrl.includes('login')),
|
||||
},
|
||||
{
|
||||
context: '/websocket',
|
||||
target: TARGET,
|
||||
secure: false,
|
||||
ws: true
|
||||
}]
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user