We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d01e487 commit 808bed4Copy full SHA for 808bed4
1 file changed
next.config.ts
@@ -43,7 +43,7 @@ const nextConfig: NextConfig = {
43
},
44
];
45
46
- webpack: (config) => {
+ webpack: (config, { isServer }) => {
47
config.plugins.push(
48
new PyodidePlugin({
49
// public/ 以下に書き出すと404
@@ -52,6 +52,17 @@ const nextConfig: NextConfig = {
52
outDirectory: `static/pyodide/v${pyodideVersion}`,
53
})
54
);
55
+ if (isServer) {
56
+ config.optimization.splitChunks.cacheGroups = {
57
+ ...config.optimization.splitChunks.cacheGroups,
58
+ sentry: {
59
+ test: /@sentry/,
60
+ name: "sentry",
61
+ priority: 10,
62
+ enforce: true,
63
+ },
64
+ };
65
+ }
66
// import hoge from "./file?raw" でfileの中身を文字列としてインポート
67
for (const rule of config.module.rules) {
68
if (rule.resourceQuery instanceof RegExp) {
0 commit comments