Skip to content

Commit

Permalink
fix: missing no such file or directory when dist folder not existed b…
Browse files Browse the repository at this point in the history
…efore build (#17)
  • Loading branch information
mariusheine committed Mar 22, 2022
1 parent 6e1a398 commit 4768440
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/envConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export function envConfig(userOptions: Partial<EnvConfigOptions> = {}): Plugin {
const templateContent = createEnvConfigContent(userOptions.variables || [], true);

const TEMPLATE_PATH = path.join(root, 'dist', 'env-config.template.js');
fs.mkdirSync(path.dirname(TEMPLATE_PATH), { recursive: true });
fs.writeFileSync(TEMPLATE_PATH, templateContent, 'utf8');
},

Expand Down

0 comments on commit 4768440

Please sign in to comment.