Skip to content

Commit 1e0192e

Browse files
Yuuno, Hibikijoeyklee
authored andcommitted
fix issue that server fails to listen dev folder (#287)
1 parent 6219d08 commit 1e0192e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

webpack.dev.babel.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// This software is released under the MIT License.
44
// https://opensource.org/licenses/MIT
55

6+
import { existsSync } from 'fs';
67
import { join } from 'path';
78
import merge from 'webpack-merge';
89
import common from './webpack.common.babel';
@@ -13,11 +14,11 @@ export default merge(common, {
1314
devtool: 'inline-source-map',
1415
devServer: {
1516
watchContentBase: true,
16-
contentBase: join(__dirname, './dist')
17+
contentBase: [join(__dirname, './dist'), join(__dirname, './experiments')]
1718
},
18-
plugins: [
19+
plugins: existsSync(join(__dirname, './experiments/index.html')) ? [] : [
1920
new HtmlWebpackPlugin({
2021
title: 'ml5'
2122
})
2223
]
23-
})
24+
})

0 commit comments

Comments
 (0)