chore: add proxy backend (#3126)
* feat(backends): add proxy backend * feat: add proxy server initial commit * fix: move from joi to @hapi/joi * test: add joi validation tests * feat: proxy server initial implementations * test: add tests, fix build * chore: update yarn.lock * build: fix develop command * fix(back-proxy): fix bugs * test(backend-proxy): add cypress tests * chore: cleanup * chore: support node 10 * chore: code cleanup * chore: run cypress on ubuntu 16.04 * test(e2e): fix proxy backend cypress tests * chore: don't start proxy server on yarn develop
This commit is contained in:
committed by
Shawn Erquhart
parent
cf57da223d
commit
7e8084be87
36
packages/netlify-cms-proxy-server/webpack.config.js
Normal file
36
packages/netlify-cms-proxy-server/webpack.config.js
Normal file
@ -0,0 +1,36 @@
|
||||
const path = require('path');
|
||||
const nodeExternals = require('webpack-node-externals');
|
||||
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
|
||||
const { NODE_ENV = 'production' } = process.env;
|
||||
|
||||
const allowList = [/^netlify-cms-lib-util/];
|
||||
|
||||
module.exports = {
|
||||
entry: path.join('src', 'index.ts'),
|
||||
mode: NODE_ENV,
|
||||
target: 'node',
|
||||
devtool: 'source-map',
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: 'index.js',
|
||||
},
|
||||
resolve: {
|
||||
plugins: [new TsconfigPathsPlugin()],
|
||||
extensions: ['.ts', '.js'],
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
use: ['ts-loader'],
|
||||
},
|
||||
],
|
||||
},
|
||||
externals: [
|
||||
nodeExternals({ whitelist: allowList }),
|
||||
nodeExternals({
|
||||
whitelist: allowList,
|
||||
modulesDir: path.resolve(__dirname, path.join('..', '..', 'node_modules')),
|
||||
}),
|
||||
],
|
||||
};
|
Reference in New Issue
Block a user