小编Mát*_*lya的帖子

How to configure vite/rollup to exclude firebase-admin from my clientside code?

I've been using this vite-plugin-ssr with firebase functions happily until one day firebase-admin bailed on me. My setup was working until I deleted my node modules and reinstalled my dependencies. It seems that vite is bundling firebase-admin with the client even though there are no imports in clientside code referring to firebase-admin, only in the .page.server.ts files. How do I specify to vite or rollup to not bundle firebase-admin into the dist/client directory?

\n

I would really appreciate some …

firebase typescript server-side-rendering firebase-admin vite

2
推荐指数
1
解决办法
3243
查看次数

如何检查是否拒绝访问字符串路径?

我想知道如何测试我是否可以访问字符串路径.这是我使用的代码:

using System;
using System.IO;

namescpace prog1
{
    class Program
    {
        static void Main(string[] args)
        {
            string path = @"C:\Users\Admin";
            DirectoryInfo dir = new DirectoryInfo(path);
            foreach (FileInfo fil in dir.GetFiles())
            {
                //At dir.GetFiles, I get an error  saying
                //access to the string path is denied.

                Console.WriteLine(fil.Name);
            }
            Console.ReadLine();
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

我想测试访问是否被拒绝(到字符串路径)然后执行GetFiles和所有这些.

我已经发现了这个问题:如何轻松检查.NET中的文件是否被拒绝访问?

有帮助吗?

c# file-access

1
推荐指数
1
解决办法
3694
查看次数