File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ const nextConfig: NextConfig = {
4343 } ,
4444 ] ;
4545 } ,
46- webpack : ( config ) => {
46+ webpack : ( config , { isServer } ) => {
4747 config . plugins . push (
4848 new PyodidePlugin ( {
4949 // public/ 以下に書き出すと404
@@ -52,6 +52,17 @@ const nextConfig: NextConfig = {
5252 outDirectory : `static/pyodide/v${ pyodideVersion } ` ,
5353 } )
5454 ) ;
55+ if ( isServer ) {
56+ config . optimization . splitChunks . cacheGroups = {
57+ ...config . optimization . splitChunks . cacheGroups ,
58+ sentry : {
59+ test : / @ s e n t r y / ,
60+ name : "sentry" ,
61+ priority : 10 ,
62+ enforce : true ,
63+ } ,
64+ } ;
65+ }
5566 // import hoge from "./file?raw" でfileの中身を文字列としてインポート
5667 for ( const rule of config . module . rules ) {
5768 if ( rule . resourceQuery instanceof RegExp ) {
You can’t perform that action at this time.
0 commit comments