Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

base path cause script and css path error! #1792

Open
bookyo opened this issue Jul 20, 2021 · 5 comments
Open

base path cause script and css path error! #1792

bookyo opened this issue Jul 20, 2021 · 5 comments

Comments

@bookyo
Copy link

bookyo commented Jul 20, 2021

if url have chinese, the base path will wrong, and base path wrong cause every css and script wrong.

my url: http://127.0.0.1:3000/category/%E7%88%B1%E6%83%85
79DB62DA-F1D4-4E2F-9308-455AD5676A23

check page source:
4D0343F0-7CE5-435F-92F2-36D7487B9310

my package.json:

"dependencies": {
    "axios": "^0.21.1",
    "body-parser": "^1.19.0",
    "compression": "^1.7.1",
    "connect-redis": "^5.0.0",
    "crypto": "^1.0.1",
    "dayjs": "^1.10.1",
    "express-session": "^1.17.1",
    "form-data": "^4.0.0",
    "multer": "^1.4.2",
    "perfect-scrollbar": "^1.5.0",
    "plyr": "^3.6.4",
    "polka": "next",
    "rate-limiter-flexible": "^2.2.1",
    "redis": "^3.0.2",
    "sirv": "^1.0.0",
    "ua-parser-js": "^0.7.28"
  },
  "devDependencies": {
    "@babel/core": "^7.0.0",
    "@babel/plugin-syntax-dynamic-import": "^7.0.0",
    "@babel/plugin-transform-runtime": "^7.0.0",
    "@babel/preset-env": "^7.0.0",
    "@babel/runtime": "^7.0.0",
    "@beyonk/svelte-carousel": "^2.8.0",
    "@rollup/plugin-babel": "^5.0.0",
    "@rollup/plugin-commonjs": "^14.0.0",
    "@rollup/plugin-node-resolve": "^8.0.0",
    "@rollup/plugin-replace": "^2.2.0",
    "@rollup/plugin-url": "^5.0.0",
    "@zerodevx/svelte-toast": "^0.1.4",
    "rollup": "^2.3.4",
    "rollup-plugin-svelte": "^7.0.0",
    "rollup-plugin-terser": "^7.0.0",
    "sapper": "^0.28.10",
    "svelte": "^3.24.3",
    "svelte-lazy": "^1.0.10",
    "sveltestrap": "^4.2.1"
  }
@bookyo
Copy link
Author

bookyo commented Jul 20, 2021

update 0.29.1,The situation remains the same

@bookyo
Copy link
Author

bookyo commented Jul 20, 2021

i found issue is because i use store() in sapper project, if i use session replace store will work fine!

@bookyo bookyo closed this as completed Jul 20, 2021
@bookyo bookyo reopened this Jul 26, 2021
@bookyo
Copy link
Author

bookyo commented Jul 26, 2021

I have seen this issue again!
my url: http://127.0.0.1:3000/tags/%E5%8A%A8%E7%94%BB
and will cause this:
717E5F69-74C2-46E5-936C-8174F8FC91AD
394CCD6A-E8D1-4D69-A640-73344B5156DF
087839DE-E9EC-4CDE-BD43-7A96AAE88862

my package.json:

"dependencies": {
    "axios": "^0.21.1",
    "body-parser": "^1.19.0",
    "compression": "^1.7.1",
    "connect-redis": "^5.0.0",
    "crypto": "^1.0.1",
    "dayjs": "^1.10.1",
    "express-session": "^1.17.1",
    "form-data": "^4.0.0",
    "multer": "^1.4.2",
    "perfect-scrollbar": "^1.5.0",
    "plyr": "^3.6.4",
    "polka": "next",
    "rate-limiter-flexible": "^2.2.1",
    "redis": "^3.0.2",
    "sirv": "^1.0.0",
    "ua-parser-js": "^0.7.28"
  },
  "devDependencies": {
    "@babel/core": "^7.0.0",
    "@babel/plugin-syntax-dynamic-import": "^7.0.0",
    "@babel/plugin-transform-runtime": "^7.0.0",
    "@babel/preset-env": "^7.0.0",
    "@babel/runtime": "^7.0.0",
    "@beyonk/svelte-carousel": "^2.8.0",
    "@rollup/plugin-babel": "^5.0.0",
    "@rollup/plugin-commonjs": "^14.0.0",
    "@rollup/plugin-node-resolve": "^8.0.0",
    "@rollup/plugin-replace": "^2.2.0",
    "@rollup/plugin-url": "^5.0.0",
    "@zerodevx/svelte-toast": "^0.1.4",
    "rollup": "^2.3.4",
    "rollup-plugin-svelte": "^7.0.0",
    "rollup-plugin-terser": "^7.0.0",
    "sapper": "^0.29.1",
    "svelte": "^3.24.3",
    "svelte-lazy": "^1.0.10",
    "sveltestrap": "^4.2.1"
  }

last time i use store in sapper cause issue, but this time i dont know why.

@bookyo
Copy link
Author

bookyo commented Jul 26, 2021

if url contain chinese will cause this issue.
like:http://127.0.0.1:3000/category/用户

@bookyo
Copy link
Author

bookyo commented Jul 27, 2021

it may be polka's bug.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant