❶ One is a new React framework - target web and native with a single Vite plugin and fully shared code, so you can ship cross-platform nearly as easy as single-platform.
In the app produced by the npx one template, running web produces the following warning:
Assets in public directory cannot be imported from JavaScript.
If you intend to import that asset, put the file in the src directory, and use /src/app-icon.png instead of /public/app-icon.png.
If you intend to use the URL of that asset, use /app-icon.png?url.
Files in the public directory are served at the root path.
Instead of /public/app-icon.png, use /app-icon.png.
As a new user of the framework, it's confusing because it sounds like "you're doing it wrong", but maybe there's a reason that you stuck the asset in public instead of somewhere else in the source tree? Changing the example to <Image src="/app-icon.png" ... /> works and gets rid of the warning, but maybe there's a reason not to do that (does it work cross-platform?)
In the app produced by the
npx one
template, running web produces the following warning:As a new user of the framework, it's confusing because it sounds like "you're doing it wrong", but maybe there's a reason that you stuck the asset in
public
instead of somewhere else in the source tree? Changing the example to<Image src="/app-icon.png" ... />
works and gets rid of the warning, but maybe there's a reason not to do that (does it work cross-platform?)