public 静态资源目录

image.png

  1. exports.static = {
  2. prefix: '/public/',
  3. dir: path.join(appInfo.baseDir, 'app/public'),
  4. // dirs: [ dir1, dir2 ] or [ dir1, { prefix: '/static2', dir: dir2 } ],
  5. // support lazy load
  6. dynamic: true,
  7. preload: false,
  8. buffer: false,
  9. maxFiles: 1000,
  10. };

prefix: ‘/‘
image.png
prefix: ‘/public’
image.png