lukeed / pwa

(WIP) Universal PWA Builder
https://pwa.cafe
3.13k stars 100 forks source link

Help, how to remove .svelte file from browser source #67

Closed odick closed 4 years ago

odick commented 4 years ago

Screenshot from 2019-11-13 20 13 19 Webpack devtools is false on production but still see the svelte file from browser source Any help on this @lukeed @olso

lukeed commented 4 years ago

Need source and/or reproduction

odick commented 4 years ago

I test with the default sample cli (pwa init) and the result is the same Test with vue preset, no vue files on the source Probably the problem is with the svelte preset Some screenshot: INIT PWA Screenshot from 2019-11-14 11 05 07 RUN START Screenshot from 2019-11-14 11 17 35 NOW add disable devtools Screenshot from 2019-11-14 11 28 15 Webpack source map gone, but the svelte code still in source Please help, thank you

odick commented 4 years ago

@lukeed I found the solution, just set this to false https://github.com/lukeed/pwa/blob/b3b928a0880f58d9cae6a45c6270dbbc67dfb2a0/packages/preset-svelte/index.js#L43 And all the svelte file from removed from the browser source But as a result, svelte will not generate css in the build

Any clue on how to set emitCss to false in pwa.config.js? Thank you