cake-contrib / cake-contrib/Cake.Webpack
Setting FromPath not working as expected
- Dominant language
- C#
- Stars
- 0
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
Trying to use this addin to bundle my app, but can't get it to run from the right location (I think?)
My directory structure looks like this:
```
[project root]
/ src
/app
webpack.config.js
/src
main.js
```
My build task is:
```
Task("Webpack")
.IsDependentOn("Run-Unit-Tests")
.Does(() =>
{
Webpack.Global();
Webpack.FromPath("./src/app").Global();
Webpack.Global(s => s.FromConfig("./src/app/webpack.config.js"));
Webpack.Global(s => s.WithArguments("src/main.js --verbose"));
});
```
No matter what I do, I'm always getting the following error:
```
========================================
Webpack
========================================
Executing task: Webpack
No configuration file found and no output filename configured via CLI option.
A configuration file could be named 'webpack.config.js' in the current directory.
Use --help to display the CLI options.
An error occurred when executing task 'Webpack'.
Error: Webpack: Process returned an error (exit code -1).
```
Am I setting this up correctly? My `webpack.config.js` should be set up correctly - when I run webpack from the command line in `src/app` it works as expected.
Contributor guide
Assessment
This issue has not been assessed yet.