diff --git a/lib/generators/loader-generator.js b/lib/generators/loader-generator.js index 3586bf4fe3c..331f1feacd0 100644 --- a/lib/generators/loader-generator.js +++ b/lib/generators/loader-generator.js @@ -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", @@ -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 }) ); diff --git a/lib/generators/plugin-generator.js b/lib/generators/plugin-generator.js index 92e495766c8..5184ada3379 100644 --- a/lib/generators/plugin-generator.js +++ b/lib/generators/plugin-generator.js @@ -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", @@ -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)) }) );