Skip to content

Commit

Permalink
fix(loader,plugin): fix generators path bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvdutt committed Mar 25, 2018
1 parent 0de8a4e commit b4bfafb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions lib/generators/loader-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const LoaderGenerator = webpackGenerator(
validate: str => str.length > 0
}
],
path.join(__dirname, "templates"),
path.join(__dirname, "../generate-loader/templates"),
[
"src/cjs.js.tpl",
"test/test-utils.js.tpl",
Expand All @@ -48,7 +48,9 @@ const LoaderGenerator = webpackGenerator(
"examples/simple/src/lazy-module.js.tpl",
"examples/simple/src/static-esm-module.js.tpl"
],
["src/_index.js.tpl"],
[
"src/_index.js.tpl"
],
gen => ({ name: gen.props.name })
);

Expand Down
7 changes: 5 additions & 2 deletions lib/generators/plugin-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const PluginGenerator = webpackGenerator(
validate: str => str.length > 0
}
],
path.join(__dirname, "templates"),
path.join(__dirname, "../generate-plugin/templates"),
[
"src/cjs.js.tpl",
"test/test-utils.js.tpl",
Expand All @@ -30,7 +30,10 @@ const PluginGenerator = webpackGenerator(
"examples/simple/src/lazy-module.js.tpl",
"examples/simple/src/static-esm-module.js.tpl"
],
["src/_index.js.tpl", "examples/simple/_webpack.config.js.tpl"],
[
"src/_index.js.tpl",
"examples/simple/_webpack.config.js.tpl"
],
gen => ({ name: _.upperFirst(_.camelCase(gen.props.name)) })
);

Expand Down

0 comments on commit b4bfafb

Please sign in to comment.