Read flag file from .next static output
Unanswered
American black bear posted this in #help-forum
American black bearOP
Hey,
i'm creating a flag file called
I see the file now in the output, however, I'm not sure how I can read from it now during runtime as it's not in my top level anymore and in the production build output (see attached image)
Who can give me a hint please?
i'm creating a flag file called
slsq-config.json with a npm plugin for NextJS. The file is stored at top level of my Next app and I copy it into the static folder with webpack likewebpack(config: any, options: WebpackConfigContext) {
if (!options.isServer) {
config.plugins.push(
new CopyPlugin({
patterns: [
{
from: FLAG_FILE,
to: 'static'
},
],
})
);
}I see the file now in the output, however, I'm not sure how I can read from it now during runtime as it's not in my top level anymore and in the production build output (see attached image)
Who can give me a hint please?