We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 348b62b + d61ce4f commit 1bead9fCopy full SHA for 1bead9f
src/index.js
@@ -24,13 +24,13 @@ const getOutputDir = (compiler) => {
24
return compiler.options.output.path;
25
}
26
27
- const outputPath = compiler.options.devServer.outputPath;
+ const devServer = compiler.options.devServer;
28
29
- if (!outputPath || outputPath === '/') {
+ if (!devServer || !devServer.outputPath || devServer.outputPath === '/') {
30
throw new Error('CopyWebpackPlugin: to use webpack-dev-server, devServer.outputPath must be defined in the webpack config');
31
32
33
- return outputPath;
+ return devServer.outputPath;
34
};
35
36
export default (patterns = [], options = {}) => {
0 commit comments