From 9c8500894b7f9c1d39cc0f568cbbf1fc896c866e Mon Sep 17 00:00:00 2001 From: TJ Egan Date: Fri, 26 Feb 2021 11:56:32 -0800 Subject: [PATCH] chore(dev): update vanilla server to use updated path-to-RegExp commands (#7907) Co-authored-by: Taylor Jones Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- packages/components/server.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/components/server.js b/packages/components/server.js index 3f992010a1e8..531023245219 100644 --- a/packages/components/server.js +++ b/packages/components/server.js @@ -1,7 +1,7 @@ 'use strict'; const path = require('path'); -const pathRegexp = require('path-to-regexp'); +const { pathToRegexp } = require('path-to-regexp'); const browserSync = require('browser-sync'); const serveStatic = require('serve-static'); @@ -61,9 +61,9 @@ if (devMode) { .on('unlink', invokeWatchCallback); } -const reComponentPath = pathRegexp('/component/:component'); -const reDemoComponentPath = pathRegexp('/demo/:component'); -const reCodePath = pathRegexp('/code/:component'); +const reComponentPath = pathToRegexp('/component/:component'); +const reDemoComponentPath = pathToRegexp('/demo/:component'); +const reCodePath = pathToRegexp('/code/:component'); const demoStaticRoute = serveStatic('demo'); function noopRoute(req, res, next) {