run only for non server webpack

This commit is contained in:
Abhinav 2021-12-03 19:01:53 +05:30
parent 28dd87b35b
commit 82a15ef66d

View file

@ -3,7 +3,7 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
});
const withWorkbox = require('@ente-io/next-with-workbox');
const { withSentryConfig } = require('@sentry/nextjs');
// const { withSentryConfig } = require('@sentry/nextjs');
const cp = require('child_process');
const gitSha = cp.execSync('git rev-parse --short HEAD', {
@ -15,8 +15,8 @@ const { createSecureHeaders } = require('next-secure-headers');
const { SubresourceIntegrityPlugin } = require('webpack-subresource-integrity');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = withSentryConfig(
withWorkbox(
module.exports = withWorkbox(
// withSentryConfig(
withBundleAnalyzer({
env: {
SENTRY_RELEASE: gitSha,
@ -58,14 +58,17 @@ module.exports = withSentryConfig(
webpack: (config, { isServer }) => {
if (!isServer) {
config.resolve.fallback.fs = false;
}
config.output.crossOriginLoading = 'anonymous';
config.plugins = config.plugins || [];
config.plugins.push(new HtmlWebpackPlugin());
config.plugins.push(new SubresourceIntegrityPlugin());
config.plugins.push(
new SubresourceIntegrityPlugin({ enabled: true })
);
}
return config;
},
})
),
{ release: gitSha }
);
/* { release: gitSha }
);*/