Skip to content

Commit

Permalink
misc: remove dist completely
Browse files Browse the repository at this point in the history
  • Loading branch information
EvsChen committed Dec 28, 2018
1 parent 5839cb2 commit 39a45d6
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions packages/generators/init-generator.ts
Expand Up @@ -59,7 +59,6 @@ export default class InitGenerator extends Generator {
const self: this = this;
let regExpForStyles: string;
let ExtractUseProps: object[];
let outputPath: string = "dist";

process.stdout.write(
"\n" +
Expand Down Expand Up @@ -125,17 +124,9 @@ export default class InitGenerator extends Generator {
filename: "'[name].[chunkhash].js'",
};
}
if (outputTypeAnswer.outputType.length) {
outputPath = outputTypeAnswer.outputType;
}
// If entry is single and default output path is chosen
// output path is default to 'dist' by webpack
const isSingleEntry = typeof this.configuration.config.webpackOptions.entry === "string";
if (
!this.usingDefaults &&
!(outputTypeAnswer.outputType.length === 0 && isSingleEntry)
) {
this.configuration.config.webpackOptions.output.path = `path.resolve(__dirname, '${outputPath}')`;
if (!this.usingDefaults && outputTypeAnswer.outputType.length) {
this.configuration.config.webpackOptions.output.path =
`path.resolve(__dirname, '${outputTypeAnswer.outputType}')`;
}
})
.then((_: void) => {
Expand Down

0 comments on commit 39a45d6

Please sign in to comment.