mirror of
https://github.com/directus/directus.git
synced 2026-01-28 04:58:07 -05:00
* Bump prettier from 1.19.1 to 2.0.2 Bumps [prettier](https://github.com/prettier/prettier) from 1.19.1 to 2.0.2. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/1.19.1...2.0.2) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Add dangling comma's * Update eslint config to match prettier default * Make eslint match prettier for real this time Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
32 lines
874 B
JavaScript
32 lines
874 B
JavaScript
if (!process.env.API_URL && process.env.NODE_ENV === 'development') {
|
|
console.log(`
|
|
⚠️ No API URL passed. Using the demo API as a fallback.
|
|
`);
|
|
}
|
|
|
|
module.exports = {
|
|
lintOnSave: false,
|
|
publicPath: process.env.NODE_ENV === 'production' ? '' : '/admin/',
|
|
|
|
devServer: {
|
|
allowedHosts: ['localhost', '.gitpod.io'],
|
|
public: '127.0.0.1:8080',
|
|
proxy: {
|
|
'/': {
|
|
target: process.env.API_URL ? process.env.API_URL : 'https://demo.directus.io/',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
|
|
// There are so many chunks (from all the interfaces / layouts) that we need to make sure to not
|
|
// prefetch them all. Prefetching them all will cause the server to apply rate limits in most cases
|
|
chainWebpack: (config) => {
|
|
config.plugins.delete('prefetch');
|
|
|
|
if (process.env.NODE_ENV === 'development') {
|
|
config.output.filename('[name].[hash].js').end();
|
|
}
|
|
},
|
|
};
|