function toImport(publicPath, filename) {
	let value = posix.join(publicPath, filename);

	if (/^(https?:)?\/\//.test(publicPath)) {
		const isFull = /^https?:\/\//.test(publicPath);
		const root = isFull ? publicPath : 'https:' + publicPath;
		value = new URL(filename, root).href.substring(isFull ? 0 : 6);
	}

	return JSON.stringify(value);
}
@param {string} publicPath
@param {string} filename