File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
packages/vike-server/src/plugin/plugins Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,12 @@ import type { Plugin } from 'vite'
33export function setPhotonMeta ( ) : Plugin {
44 return {
55 name : 'vike-server:set-photon-meta' ,
6- transform ( _code , id ) {
7- if ( id . match ( / \+ m i d d l e w a r e \. [ j t ] s / ) ) {
8- // Forces full-reload when a +middleware file is modified
6+ transform : {
7+ filter : {
8+ id : [ / \+ m i d d l e w a r e \. [ j t ] s / ]
9+ } ,
10+ handler ( _code , id ) {
11+ // Forces full-reload on server side when a +middleware file is modified
912 return { meta : { photonConfig : { isGlobal : true } } }
1013 }
1114 }
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ const OPTIONAL_NPM_IMPORTS = [
1414 'class-transformer'
1515]
1616
17+ // TODO should this be moved to Photon, under node target?
1718export function standalonePlugin ( ) : Plugin {
1819 let root = ''
1920 let outDir = ''
Original file line number Diff line number Diff line change 11import { getVikeConfig } from 'vike/plugin'
22import type { Plugin } from 'vite'
33
4+ // Forward config from Vike to Photon
45export function vikeServerConfigToPhotonPlugin ( ) : Plugin {
56 return {
67 name : 'vike-server:to-photon-config' ,
You can’t perform that action at this time.
0 commit comments