Skip to content

Commit 9c85008

Browse files
tw15egantay1orjoneskodiakhq[bot]
authored
chore(dev): update vanilla server to use updated path-to-RegExp commands (#7907)
Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent c7ea23a commit 9c85008

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/components/server.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
const path = require('path');
4-
const pathRegexp = require('path-to-regexp');
4+
const { pathToRegexp } = require('path-to-regexp');
55
const browserSync = require('browser-sync');
66
const serveStatic = require('serve-static');
77

@@ -61,9 +61,9 @@ if (devMode) {
6161
.on('unlink', invokeWatchCallback);
6262
}
6363

64-
const reComponentPath = pathRegexp('/component/:component');
65-
const reDemoComponentPath = pathRegexp('/demo/:component');
66-
const reCodePath = pathRegexp('/code/:component');
64+
const reComponentPath = pathToRegexp('/component/:component');
65+
const reDemoComponentPath = pathToRegexp('/demo/:component');
66+
const reCodePath = pathToRegexp('/code/:component');
6767
const demoStaticRoute = serveStatic('demo');
6868

6969
function noopRoute(req, res, next) {

0 commit comments

Comments
 (0)