Skip to content

Commit

Permalink
chore: remove unless code
Browse files Browse the repository at this point in the history
  • Loading branch information
ErKeLost committed Dec 22, 2024
1 parent fa293b2 commit d98885a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/refactor-react/farm.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default defineConfig({
// cacheDir: "node_modules/.adny",
// },
output: {
// publicPath: "/aaa/",
publicPath: "/aaa/",
},
},
server: {
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/server/middlewares/resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export function resourceMiddleware(app: Server): Connect.NextHandleFunction {
if (resourceResult === true) {
return next();
}

// TODO if write to dist should be use sirv middleware
if (resourceResult) {
// need judge if resource is a deps node_modules set cache-control to 1 year
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/server/middlewares/static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
} from '../../utils/index.js';
import { stripQueryAndHash, withTrailingSlash } from '../../utils/path.js';

import { OutgoingHttpHeaders, ServerResponse } from 'node:http';
import { OutgoingHttpHeaders } from 'node:http';
import type Connect from 'connect';
import sirv, { Options } from 'sirv';
import type { Server } from '../index.js';
Expand Down

0 comments on commit d98885a

Please sign in to comment.