Skip to content

Commit

Permalink
chore(dev): update vanilla server to use updated path-to-RegExp comma…
Browse files Browse the repository at this point in the history
…nds (#7907)

Co-authored-by: Taylor Jones <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 26, 2021
1 parent c7ea23a commit 9c85008
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/components/server.js
Original file line number Diff line number Diff line change
@@ -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');

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 9c85008

Please sign in to comment.