graphql-engine/frontend/tools/webpack/withDevAssetLoader.js
Nicolas Beaussart f3951e1680 frontend: update nx to latest 15
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8079
Co-authored-by: Stefano Magni <173663+NoriSte@users.noreply.github.com>
GitOrigin-RevId: 46b1ed03ab225fccc9d769203d1af11a6bcdb63e
2023-02-28 19:42:51 +00:00

15 lines
388 B
JavaScript

const { merge } = require('webpack-merge');
const dynamicAssetLoader = require('unplugin-dynamic-asset-loader');
module.exports =
() =>
(config, { options, context }) => {
const isDevBuild = context.configurationName === 'development';
if (!isDevBuild) {
return config;
}
return merge(config, {
plugins: [dynamicAssetLoader.webpackPlugin()],
});
};