Skip to content

Commit

Permalink
Merge branch 'master' into issue-158
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi authored Feb 18, 2019
2 parents cd23c1d + 2f3ee34 commit be69a90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/processPattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ export default function processPattern(globalRef, pattern) {

if (path.isAbsolute(file.webpackTo)) {
if (output === '/') {
// eslint-disable-next-line no-throw-literal
throw '[copy-webpack-plugin] Using older versions of webpack-dev-server, devServer.outputPath must be defined to write to absolute paths';
throw new Error(
'[copy-webpack-plugin] Using older versions of webpack-dev-server, devServer.outputPath must be defined to write to absolute paths'
);
}

file.webpackTo = path.relative(output, file.webpackTo);
Expand Down
5 changes: 3 additions & 2 deletions test/CopyPlugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -898,8 +898,9 @@ describe('apply function', () => {
}),
expectedAssetKeys: [],
expectedErrors: [
'[copy-webpack-plugin] Using older versions of webpack-dev-server, devServer.outputPath must be ' +
'defined to write to absolute paths',
new Error(
'[copy-webpack-plugin] Using older versions of webpack-dev-server, devServer.outputPath must be defined to write to absolute paths'
),
],
patterns: [
{
Expand Down

0 comments on commit be69a90

Please # to comment.