File tree 1 file changed +3
-2
lines changed
packages/playground/optimize-missing-deps
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,11 @@ async function createServer(root = process.cwd()) {
25
25
let template = fs . readFileSync ( resolve ( 'index.html' ) , 'utf-8' )
26
26
template = await vite . transformIndexHtml ( req . originalUrl , template )
27
27
28
- // this will import missing deps nest built-in deps that should not be optimized
28
+ // `main.js` imports dependencies that are yet to be discovered and optimized, aka "missing" deps.
29
+ // Loading `main.js` in SSR should not trigger optimizing the "missing" deps
29
30
const { name } = await vite . ssrLoadModule ( './main.js' )
30
31
31
- // this will import missing deps that should be optimized correctly
32
+ // Loading `main.js` in the client should trigger optimizing the "missing" deps
32
33
const appHtml = `<div id="app">${ name } </div>
33
34
<script type='module'>
34
35
import { name } from './main.js'
You can’t perform that action at this time.
0 commit comments