GithubHelp home page GithubHelp logo

vite-plugin-sitemap's Introduction

Hi there, I'm JB Aubrée 👋

I'm a Front-end Developer, VueJS, UnoCSS, Vite lover.


jbaubree's GitHub stats


Top Langs

vite-plugin-sitemap's People

Contributors

jbaubree avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

ericuldall

vite-plugin-sitemap's Issues

Add additional sitemaps to robots.txt

It's common to have multiple Sitemap: directives in a robots.txt file.
Especially for retail sites that may have a large number of products that are frequently updated. Product sitemaps can be generated in realtime.

So, you may have something like this:

Sitemap: https://example.com/sitemap.xml <----- handles basic static pages, can probably get generated at buildtime
Sitemap: https://example.com/products_sitemap.xml <---- handles products, will be generated in realtime or server side as needed

See https://www.walmart.com/robots.txt for a realworld example

Support Vue Router

Any idea or plans on how we can support view router to generate paths in our sitemap?

Support `outDir` other than `dist`

Hi there, I was attempting to try this out (on a project of mine) but after adding this to my dev dependencies the output I get is:

⊙  pnpm run build                                                                                                                                                                                                                                                 julian@Mini

> [email protected] build /Users/julian/Development/bowtie/frontend
> tsc && vite build

vite v5.0.12 building for production...
node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/react-bootstrap/esm/FormControl.js (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/react-bootstrap/esm/DropdownMenu.js (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/react-bootstrap/esm/FormLabel.js (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/react-bootstrap/esm/ListGroup.js (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/react-bootstrap/esm/ListGroupItem.js (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/react-bootstrap/esm/OverlayTrigger.js (1:0) Error when using sourcemap for reporting an error: Can't resolve original location of error.
✓ 2331 modules transformed.
build/index.html                   0.52 kB │ gzip:   0.32 kB
build/assets/index-F4sdiRem.css  233.12 kB │ gzip:  31.46 kB
build/assets/index-xqEkhzsp.js   491.12 kB │ gzip: 156.60 kB │ map: 1,797.82 kB
✓ built in 2.38s
error during build:
Error: ENOENT: no such file or directory, open '/Users/julian/Development/bowtie/frontend/dist/robots.txt'
    at Object.writeFileSync (node:fs:2343:20)
    at generateSitemap (/Users/julian/Development/bowtie/frontend/node_modules/.pnpm/[email protected]/node_modules/vite-plugin-sitemap/dist/index.js:10964:13)
    at Object.closeBundle (/Users/julian/Development/bowtie/frontend/node_modules/.pnpm/[email protected]/node_modules/vite-plugin-sitemap/dist/index.js:10984:7)
    at file:///Users/julian/Development/bowtie/frontend/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:18692:40
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Promise.all (index 0)
    at async PluginDriver.hookParallel (file:///Users/julian/Development/bowtie/frontend/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:18620:9)
    at async Object.close (file:///Users/julian/Development/bowtie/frontend/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:19544:13)
    at async build (file:///Users/julian/Development/bowtie/frontend/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:67191:13)
    at async CAC.<anonymous> (file:///Users/julian/Development/bowtie/frontend/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/cli.js:845:9)
 ELIFECYCLE  Command failed with exit code 1.

I assume this has to do with us setting outDir to something, and perhaps that being hardcoded here to look in dist/ but I haven't looked carefully at diagnosing so apologies if that's way off. I may try to do so later, but filing just in case it's helpful as-is.

Sitemap is not a function

Environment

OS: Windows 10 Home Single Language
OS Build: 19043.2006
Node: v16.13.2
Pnpm: v7.6.0

Problem

failed to load config from D:\Project\_Reproduction\reproduction-web-brand-issue\vite.config.js
error when starting dev server:
TypeError: Sitemap is not a function
    at file:///D:/Project/_Reproduction/reproduction-web-brand-issue/vite.config.js.timestamp-1663841008339.mjs:28:5
    at ModuleJob.run (node:internal/modules/esm/module_job:185:25)  
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
    at async loadConfigFromBundledFile (file:///D:/Project/_Reproduction/reproduction-web-brand-issue/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-557f29e6.js:63494:21)
    at async loadConfigFromFile (file:///D:/Project/_Reproduction/reproduction-web-brand-issue/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-557f29e6.js:63380:28)      
    at async resolveConfig (file:///D:/Project/_Reproduction/reproduction-web-brand-issue/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-557f29e6.js:62997:28)
    at async createServer (file:///D:/Project/_Reproduction/reproduction-web-brand-issue/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-557f29e6.js:62063:20)
    at async CAC.<anonymous> (file:///D:/Project/_Reproduction/reproduction-web-brand-issue/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/cli.js:700:24)
 ELIFECYCLE  Command failed with exit code 1.

Reproduction

https://github.com/alvinindra/reproduction-web-brand-issue

Plugin not working

Environment

OS: Manjaro Linux x64
Node : v18.7.0
PNPM : 7.10.0

Example working, because plugin installed directly from workspace, but when I'm installed this plugin via pnpm it won't run

Log

failed to load config from /home/akira/NODE_PROJECT/heramom-vite/vite.config.ts
error when starting dev server:
TypeError: Sitemap is not a function
    at file:///home/akira/NODE_PROJECT/heramom-vite/vite.config.ts.timestamp-1662360498371.mjs:64:5
    at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:541:24)
    at async loadConfigFromBundledFile (file:///home/akira/NODE_PROJECT/heramom-vite/node_modules/.pnpm/[email protected]_bckpmeqyxpddtxgilj5fird5uy/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:63077:21)
    at async loadConfigFromFile (file:///home/akira/NODE_PROJECT/heramom-vite/node_modules/.pnpm/[email protected]_bckpmeqyxpddtxgilj5fird5uy/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:62963:28)
    at async resolveConfig (file:///home/akira/NODE_PROJECT/heramom-vite/node_modules/.pnpm/[email protected]_bckpmeqyxpddtxgilj5fird5uy/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:62577:28)
    at async createServer (file:///home/akira/NODE_PROJECT/heramom-vite/node_modules/.pnpm/[email protected]_bckpmeqyxpddtxgilj5fird5uy/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:59183:20)
    at async CAC.<anonymous> (file:///home/akira/NODE_PROJECT/heramom-vite/node_modules/.pnpm/[email protected]_bckpmeqyxpddtxgilj5fird5uy/node_modules/vite/dist/node/cli.js:699:24)
 ELIFECYCLE  Command failed with exit code 1.
 ```

run only generation sitemap

i just want run only generation sitemap with one command line. instead of build whole project with command "npm run build". Can you help me!!!

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency pkgroll to v2.0.2
  • chore(deps): update dependency vite to v4.5.3
  • chore(deps): update dependency nodemon to v3.1.0
  • chore(deps): update dependency typescript to v5.4.5
  • chore(deps): update dependency vite-plugin-pages to v0.32.1
  • fix(deps): update dependency vue-router to v4.3.0
  • chore(deps): update dependency @vitejs/plugin-vue to v5
  • chore(deps): update dependency eslint to v9
  • chore(deps): update dependency vite to v5
  • chore(deps): update dependency vue-tsc to v2
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/ci.yml
  • actions/checkout v3
  • pnpm/action-setup v2
  • actions/setup-node v3
npm
example/package.json
  • react 18.2.0
  • vue 3.2.47
  • vue-router 4.2.5
  • @vitejs/plugin-vue 4.4.0
  • @vue/compiler-sfc 3.3.6
  • cross-env 7.0.3
  • nodemon 3.0.1
  • typescript 5.2.2
  • vite 4.5.0
  • vite-plugin-pages 0.31.0
package.json
  • @antfu/eslint-config 0.43.1
  • @types/node 18.18.6
  • eslint 8.51.0
  • pkgroll 2.0.1
  • pnpm 8.9.2
  • sitemap-ts 1.6.1
  • typescript 5.2.2
  • vite 4.5.0
  • vite-plugin-pages 0.31.0
  • vue-tsc 1.8.19
  • pnpm 8.9.2

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.