chrome-extension-tools icon indicating copy to clipboard operation
chrome-extension-tools copied to clipboard

Will pay someone to fix this: Unable to import a .webm file

Open ryanmargono opened this issue 7 months ago • 6 comments

Build tool

Vite

Where do you see the problem?

  • [X] In the browser
  • [ ] In the terminal

Describe the bug

Not able to import a .webm file to use as a video source. Am able to import images to use as img sources. Confirmed this is a plugin issue since i disabled it and ran dev in the browser as standlone vite react app. When inspecting the popup with dev tools, the asset doesn't show (when hovering the src) while the images do.

Example:

import aura from './sign-in_aura.webm'; // in src/popup/pages/sign-in
...
      <video
        src={aura}
        controls
        playsInline
        muted
        autoPlay
        loop
      />

^ This worked when using Plasmo. And this would be a blocker from us fully migrating to your tool.

Config:

import react from '@vitejs/plugin-react';
import path from 'node:path';
import { defineConfig } from 'vite';
import webExtension from 'vite-plugin-web-extension';

// https://vitejs.dev/config/
export default defineConfig({
  root: '.',
  server: {
    port: 5000,
  },
  plugins: [react(), webExtension()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src'),
      '@app/core': path.resolve(__dirname, '../core/src'),
      '@app/features': path.resolve(__dirname, '../features/src'),
    },
  },
});

Manifest:

{
	"manifest_version": 3,
	"name": "CRXJS React Vite Example",
	"version": "1.0.0",
	"action": { "default_popup": "src/index.html" }
}

Reproduction

N/A

Logs

No response

System Info

System:
    OS: macOS 13.4
    CPU: (12) arm64 Apple M2 Max
    Memory: 88.95 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.16.1 - ~/.nvm/versions/node/v18.16.1/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.16.1/bin/yarn
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.1/bin/npm
    pnpm: 8.10.5 - ~/.nvm/versions/node/v18.16.1/bin/pnpm
  Browsers:
    Chrome: 127.0.6533.89
    Safari: 16.5

Severity

blocking an upgrade

ryanmargono avatar Aug 02 '24 03:08 ryanmargono