G
G
Gretiy2021-12-12 15:09:23
Node.js
Gretiy, 2021-12-12 15:09:23

How to read file created by npm run serve file?

Hello, I need to create a file both in dist directory (after npm run build) and in (virtual directory after npm run serve - but how to get there)
I can read file in dist from npm run build

fs.readFileSync(path.resolve(__dirname, "dist", "index.html"),"utf8"),

But what about npm run serve (vue-cli-service serve)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2021-12-12
@Casufi

npm run servein this code, serve is the name of the script written in package.json to understand what is being launched there, you just need the contents of the line with serve

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question