Skip to content

[BUG] 馃敶 ERROR | Failed to resolve '../../popup.tsx' from './.plasmo/static/popup.tsx'#1040

Description

@ti-bui

What happened?

When I run npm run build, I am receiving this error:
馃敶 ERROR | Failed to resolve '../../popup.tsx' from './.plasmo/static/popup.tsx'

The file path is correct, I have my popup.tsx in the root and here's what in popup.tsx.:

import { useReducer } from 'react';

import './style.css';

export default function IndexPopup() {
  const [count, increase] = useReducer((c) => c + 1, 0);

  return (
    <button
      onClick={() => increase()}
      type="button"
      className="inline-flex items-center px-5 py-2.5 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
    >
      Hello World
      <br />
      Count:
      <span className="inline-flex items-center justify-center w-8 h-4 ml-2 text-xs font-semibold text-blue-800 bg-blue-200 rounded-full">
        {count}
      </span>
    </button>
  );
}

I have no problem with the dev build but this error raises for production. I would greatly appreciate any insights on this matter. Thanks!

Version

Latest

What OS are you seeing the problem on?

MacOSX

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

(OPTIONAL) Contribution

  • I would like to fix this BUG via a PR

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I checked the current issues for duplicate problems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions