Failed to write a js file to the packaged dist folder using scaffolding configuration fs.writeFile of vue-cli3

after the dist file is successfully packaged and generated, fs.writeFile generates a js file to the dist directory. Now the problem is that fs.writeFile has been executed in the vue.config.js configuration, but the dist directory has not been generated, indicating that the directory has not been found and cannot be written to the js file?


landlord, provide an idea:
first of all, you use fs.writeFile to generate a js file. What is it mainly for? There are webpack-chain and configureWebpack in vue.config.js to see if they can be written into a callback function.

Menu