Ghost/ghost/members-api/static/auth/preact.config.js
Fabien O'Carroll b219e26ea6 Added members lib module (#10260)
* Added members library inc. gateway

refs #10213

* Added the auth pages and build steps for them

refs #10213

* Cleaned up logs

* Updated gruntfile to run yarn for member auth

* Design refinements on members popups

* UI refinements

* Updated backend call to trigger only if frontend validation passes

* Design refinements for error messages

* Added error message for email failure

* Updated request-password-reset to not attempt to send headers twice

* Updated preact publicPath to relative path

* Build auth pages on init
2019-05-07 17:35:17 +02:00

27 lines
999 B
JavaScript

export default function (config, env, helpers) {
const postcssLoader = helpers.getLoadersByName(config, 'postcss-loader');
const cssLoader = helpers.getLoadersByName(config, 'css-loader');
postcssLoader.forEach(({ loader }) => (delete loader.options));
cssLoader.forEach(({ loader }) => (delete loader.options));
helpers.getRulesByMatchingFile(config, '*.css').forEach(({ rule }) => {
let filter = (rule.include || rule.exclude || []);
let newFilter = filter[0].replace('/components', '/styles');
filter.push(newFilter);
});
if (env.production) {
config.output.publicPath = 'static/';
} else {
config.output.publicPath = 'http://localhost:8080/';
}
config.devServer = {
quiet: true,
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
}
}
}