@@ -128,32 +128,16 @@ module.exports = merge(commonConfig, {
128128 } ,
129129 minify : true ,
130130 // For unknown URLs, fallback to the index page
131- staticFileGlobs : [ ] , // don't pre-cache anything
131+ navigateFallback : 'https://new.codesandbox.io/frame.html' ,
132+ staticFileGlobs : [ 'www/frame.html' ] ,
133+ stripPrefix : 'www/' ,
132134 // Ignores URLs starting from /__ (useful for Firebase):
133135 // https://github.com/facebookincubator/create-react-app/issues/2237#issuecomment-302693219
136+ navigateFallbackWhitelist : [ / ^ (? ! \/ _ _ ) .* / ] ,
134137 // Don't precache sourcemaps (they're large) and build asset manifest:
138+ staticFileGlobsIgnorePatterns : [ / \. m a p $ / , / a s s e t - m a n i f e s t \. j s o n $ / ] ,
135139 maximumFileSizeToCacheInBytes : 5242880 ,
136- directoryIndex : false ,
137- verbose : true ,
138140 runtimeCaching : [
139- {
140- urlPattern : / ^ h t t p s : \/ \/ \w + \. c o d e s a n d b o x \. \w + \/ $ / , // request to /
141- handler : 'networkFirst' ,
142- options : {
143- debug : true ,
144- } ,
145- } ,
146- {
147- urlPattern : / \. w o r k e r \. j s $ / ,
148- handler : 'cacheFirst' ,
149- options : {
150- cache : {
151- maxEntries : 50 ,
152- name : 'workers-cache' ,
153- } ,
154- debug : true ,
155- } ,
156- } ,
157141 {
158142 urlPattern : / a p i \/ v 1 \/ s a n d b o x e s / ,
159143 handler : 'networkFirst' ,
@@ -162,7 +146,6 @@ module.exports = merge(commonConfig, {
162146 maxEntries : 50 ,
163147 name : 'sandboxes-cache' ,
164148 } ,
165- debug : true ,
166149 } ,
167150 } ,
168151 {
@@ -173,21 +156,19 @@ module.exports = merge(commonConfig, {
173156 maxAgeSeconds : 60 * 60 * 24 ,
174157 name : 'dependency-version-cache' ,
175158 } ,
176- debug : true ,
177159 } ,
178160 } ,
179161 {
180162 // These should be dynamic, since it's not loaded from this domain
181163 // But from the root domain
182- urlPattern : / c o d e s a n d b o x \. \w + \ /s t a t i c \/ ( j s | b r o w s e r f s ) \/ / ,
164+ urlPattern : / c o d e s a n d b o x \. i o \ /s t a t i c \/ j s \/ / ,
183165 handler : 'fastest' ,
184166 options : {
185167 cache : {
186168 // A day
187169 maxAgeSeconds : 60 * 60 * 24 ,
188170 name : 'static-root-cache' ,
189171 } ,
190- debug : true ,
191172 } ,
192173 } ,
193174 {
@@ -199,7 +180,6 @@ module.exports = merge(commonConfig, {
199180 maxAgeSeconds : 60 * 60 * 24 * 7 ,
200181 name : 'dependency-url-generator-cache' ,
201182 } ,
202- debug : true ,
203183 } ,
204184 } ,
205185 {
@@ -210,7 +190,6 @@ module.exports = merge(commonConfig, {
210190 maxAgeSeconds : 60 * 60 * 24 * 7 ,
211191 name : 'dependency-files-cache' ,
212192 } ,
213- debug : true ,
214193 } ,
215194 } ,
216195 {
@@ -222,7 +201,6 @@ module.exports = merge(commonConfig, {
222201 name : 'unpkg-dep-cache' ,
223202 maxAgeSeconds : 60 * 60 * 24 * 7 ,
224203 } ,
225- debug : true ,
226204 } ,
227205 } ,
228206 {
@@ -234,7 +212,6 @@ module.exports = merge(commonConfig, {
234212 name : 'jsdelivr-dep-cache' ,
235213 maxAgeSeconds : 60 * 60 * 24 * 7 ,
236214 } ,
237- debug : true ,
238215 } ,
239216 } ,
240217 {
@@ -246,7 +223,6 @@ module.exports = merge(commonConfig, {
246223 name : 'cloudflare-cache' ,
247224 maxAgeSeconds : 60 * 60 * 24 * 7 ,
248225 } ,
249- debug : true ,
250226 } ,
251227 } ,
252228 ] ,
0 commit comments