graphql-engine/frontend/tools/webpack/withDevAssetLoader.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
388 B
JavaScript
Raw Normal View History

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()],
});
};