Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support sourcemap #1

Closed
kazupon opened this issue Jan 3, 2021 · 11 comments · May be fixed by intlify/vite-plugin-vue-i18n#33
Closed

support sourcemap #1

kazupon opened this issue Jan 3, 2021 · 11 comments · May be fixed by intlify/vite-plugin-vue-i18n#33

Comments

@kazupon
Copy link
Member

kazupon commented Jan 3, 2021

No description provided.

@kazupon kazupon transferred this issue from intlify/vite-plugin-vue-i18n Jul 4, 2021
@mHooshdar
Copy link

Any updates?

@imShara
Copy link

imShara commented Nov 2, 2021

May we have sourcemap support or just skipping sourcemaps for locale files, but not broke it at all?

Sourcemap is likely to be incorrect: a plugin (vite-plugin-vue-i18n) was used to transform files, but didn't generate a sourcemap for the transformation.
Consult the plugin documentation for help.
{"version":3,"file":"main.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}

@gongora92
Copy link

May we have sourcemap support or just skipping sourcemaps for locale files, but not broke it at all?

Sourcemap is likely to be incorrect: a plugin (vite-plugin-vue-i18n) was used to transform files, but didn't generate a sourcemap for the transformation.
Consult the plugin documentation for help.
{"version":3,"file":"main.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}

Is there any way to solve this? I'm getting this same error while trying to generate sourcemaps for Sentry.

Copy link
Member Author

kazupon commented Nov 11, 2021

I would really like to support it ...
I'm not currently a full-time OSS developer, but I have plans to continue to support it.
Please wait 🙏

@JessicaSachs
Copy link

@kazupon how can we (Cypress) help?

Copy link
Member Author

kazupon commented Nov 16, 2021

Hello! @JessicaSachs 😺
I tried to support the source map this repo before
intlify/vite-plugin-vue-i18n#33

At the time, I had a hard time mapping the source map retrieved from the rollup to the source map returned by the json and yaml generator.
if I will be possible a little more time, I think I can support the source map, but I need a little focus time on it.

If you (Cypress) can support it, I would be really happy. ☺️

@kazupon kazupon pinned this issue Nov 20, 2021
@kazupon kazupon added the Status: In Progress Work in Progress label Nov 20, 2021
kazupon added a commit that referenced this issue Nov 21, 2021
kazupon added a commit that referenced this issue Nov 21, 2021
@kazupon
Copy link
Member Author

kazupon commented Nov 22, 2021

I've just fixed it and released out @intlify/vite-plugin-vue-i18n v3.2.1
Please check it!

@gongora92
Copy link

I've just fixed it and released out @intlify/vite-plugin-vue-i18n v3.2.1 Please check it!

Thank you!

@fcomrqz
Copy link

fcomrqz commented Jan 16, 2022

We are missing a source map with @intlify/vite-plugin-vue-i18n@3.2.1 on dev mode

Console Error

DevTools failed to load source map: Could not load content for http://localhost:3000/@vite/client.mjs.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

Steps to reproduce

  1. Create a new project with npm init vite@latest my-vue-app -- --template vue
  2. Install vue-i18n with npm i @intlify/vite-plugin-vue-i18n vue-i18n
  3. Add i18n plugin to vite.config.js
  4. Run dev mode npm run dev to inspect

package.json

{
  "name": "my-vue-app",
  "version": "0.0.0",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview"
  },
  "dependencies": {
    "@intlify/vite-plugin-vue-i18n": "^3.2.1",
    "vue": "^3.2.25",
    "vue-i18n": "^9.1.9"
  },
  "devDependencies": {
    "@vitejs/plugin-vue": "^2.0.1",
    "vite": "^2.7.12"
  }
}

vite.config.js

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import i18n from '@intlify/vite-plugin-vue-i18n'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue(), i18n()],
})

Environment

macOS 12.1
Node 14.18.2
npm 8.3.1
Chrome 97
Safari 15.2

I can see the inlined source map for http://localhost:3000/@vite/client when I don't have installed the plugin, that's why I suspect that it's related.

I don't know how I can help to fix it, I hope somebody can address me.

@Ragura
Copy link

Ragura commented Jan 26, 2022

Can confirm this problem exists, also running macOS 12.1 and tried in Chrome and Safari. If @kazupon has very little time to look into it, perhaps he can point us in the right direction to look for a fix ourselves so we can make a pull request?

@kazupon
Copy link
Member Author

kazupon commented Jan 26, 2022

DevTools failed to load source map: Could not load content for http://localhost:3000/@vite/client.mjs.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

Hmm 🤔 ,
As for the cause of this, I honestly don't know.
It happens with source map support, so I'm pretty sure that fix is affecting it.
There may be a problem with the way the rollup API is used.

The issue with no support for source map has been resolved. The new issue will be opened as a separate #82

Thanks!

@kazupon kazupon closed this as completed Jan 26, 2022
@kazupon kazupon unpinned this issue Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants