Renovamen / vuepress-theme-gungnir

A blog theme for VuePress 2.
https://v2-vuepress-theme-gungnir.vercel.app
Apache License 2.0
353 stars 79 forks source link

[Bug report] Gungnir theme does not change when deploy #91

Closed DWSpace closed 1 year ago

DWSpace commented 1 year ago

✅ Checklist

🔎 Description

Concise Description

Hope you have a nice day.

As you know, I'm using vuepress-theme-gungnir to make a little blog. Now I have finished personal edition to custom this theme.

Everything run perfectly at local (in dev mode, which I use npm run docs:dev), as well as after I run npm run docs:build, I also get a perfectly static files which is all custommed.

But after deploy to netlify, all my customs seems disappear. It only appear with original gungnir theme. The same thing happen with vercel. Other codes in *.vue files also disappear.

I have been looking for many ways to figure it out, have tried many time to fix it, but there are very less information and it's not fixed at all.

you can clone my repo to run at local and check the netlify to see the difference. Please give me a help.

https://glowing-biscotti-276c40.netlify.app/

Thank you.

📄 Environment info (npx vuepress info)

System:
    OS: Windows 10 10.0.22000
    CPU: (4) x64 Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
    Memory: 6.21 GB / 11.70 GB
  Binaries:
    Node: 16.16.0 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
  Utilities:
    Git: 2.38.0.
  Browsers:
    Chrome: Not Found
    Edge: Chromium (106.0.1370.47)
  npmPackages:
    @vuepress/bundler-vite:  2.0.0-beta.49
    @vuepress/bundler-webpack: Not Found
    @vuepress/cli:  2.0.0-beta.49
    @vuepress/client:  2.0.0-beta.49
    @vuepress/core:  2.0.0-beta.49
    @vuepress/markdown:  2.0.0-beta.49
    @vuepress/plugin-active-header-links:  2.0.0-beta.49
    @vuepress/plugin-back-to-top:  2.0.0-beta.49
    @vuepress/plugin-container:  2.0.0-beta.49
    @vuepress/plugin-docsearch: Not Found
    @vuepress/plugin-external-link-icon:  2.0.0-beta.49
    @vuepress/plugin-git:  2.0.0-beta.49
    @vuepress/plugin-google-analytics:  2.0.0-beta.49
    @vuepress/plugin-medium-zoom:  2.0.0-beta.49
    @vuepress/plugin-nprogress:  2.0.0-beta.49
    @vuepress/plugin-palette:  2.0.0-beta.49
    @vuepress/plugin-prismjs:  2.0.0-beta.49
    @vuepress/plugin-pwa:  2.0.0-beta.49
    @vuepress/plugin-pwa-popup:  2.0.0-beta.49
    @vuepress/plugin-register-components: Not Found
    @vuepress/plugin-search: Not Found
    @vuepress/plugin-shiki: Not Found
    @vuepress/plugin-theme-data:  2.0.0-beta.49
    @vuepress/plugin-toc: Not Found
    @vuepress/shared:  2.0.0-beta.49
    @vuepress/theme-default:  2.0.0-beta.49
    @vuepress/utils:  2.0.0-beta.49
    vue:  3.2.41
    vue-loader: Not Found
    vue-router:  4.1.5
    vuepress: ^2.0.0-beta.49 => 2.0.0-beta.49
    vuepress-vite:  2.0.0-beta.49
    vuepress-webpack: Not Found

🔗 Reproduction link / repo:

https://github.com/DWSpace/dws-blog.git

DWSpace commented 1 year ago

is it needed to deploy first and then upload static file with netlify OR we can you netlify to deploy? Netlify's still deploy with raw code even I have not build static file first.

DWSpace commented 1 year ago

The problem is: I had edited the codes of a node_mudules directly, which took effect when running in local dev mode, but did not have any changes after deployment. Solution: there are 2 solutions.

  1. Just using patch package to keep those changes. Check here
  2. Make it as your own package and then publish it to npm, then use it. Check here, I think this is the easiest instruction.