diff --git a/lib/module.js b/lib/module.js index 3eac197..c1fc725 100644 --- a/lib/module.js +++ b/lib/module.js @@ -40,9 +40,6 @@ module.exports = async function feed () { await fs.outputFile(xmlGeneratePath, await feedCache.get(index)) }) - this.nuxt.hook('generate:extendRoutes', async routes => { - routes.push(feedOptions.path) - }) this.addServerMiddleware({ path: feedOptions.path, handler (req, res, next) { diff --git a/test/module.test.js b/test/module.test.js index 31abbb1..6f7eab5 100644 --- a/test/module.test.js +++ b/test/module.test.js @@ -23,8 +23,6 @@ describe('generator', async () => { const generator = new Generator(nuxt, new Builder(nuxt)) await generator.initiate() - const routes = await generator.initRoutes() - expect(routes.includes('/feed.xml')).toBe(true) expect(fs.readFileSync(filePath, { encoding: 'utf8' })) .toBe('\n' +