Frequently Asked Questions

How can I update Plasmo to the latest version?

You will need to purge the lock file and run the install subcommand of your chosen package manager to get the latest version of Plasmo. You can manually pin Plasmo's version by upgrading its version number in package.json and running the install subcommand accordingly.

Tilde Import Resolution

The tilde (~) always resolves to the root project directory where the package.json resides if used outside a source code module, OR with a scheme such as data-base64, data-text, or url. Thus:

  • ~rulesets/test.json used in the manifest overide inside package.json resolves to /rulesets/test.json
  • data-base64:~assets/image.png resolves to /assets/image.png
  • url:~src/code.js resolves to /src/code.js.

If the tilde is by itself without a scheme and is being used to import a source code module from another source code module (ts or tsx files), it has two behaviors depending on whether you are using the default setup or the the src directory setup:

  • With the default setup, ~ points to the project root.
  • With the src directory setup, ~ points to the src directory. Thus ~core/code-module.tsx, resolves to /src/core/code-module.tsx.