-
-
Notifications
You must be signed in to change notification settings - Fork 286
Does not copy files to actual output folder when webpack-dev-server is used #29
Copy link
Copy link
Closed
Description
It appears that nothing happens when trying to copy some extra files (not bundled) to the output folder, under the webpack-dev-server logic:
devServer: {
contentBase: './public',
outputPath: path.resolve(ROOT_PATH, 'public'),
historyApiFallback: true,
hot: true,
inline: true,
port: 33000,
progress: true
},
plugins: [
new CopyWebpackPlugin([
{from: 'src/css', to: 'css', force: true},
{from: 'src/img', to: 'img', force: true}
]),
new webpack.HotModuleReplacementPlugin(),
new OpenBrowserPlugin({url: 'http://localhost:33000'})
]
Can this be done somehow? The webpack-dev-server needs this to show some external CSS and IMAGE files. I used to be doing this with gulp but now I want to get rid of this dependency.
Using your plugin with the simple webpack (for build) works perfectly but not for webpack-dev-server.
NOTE: I can achieve what I want if I use both webpack and webpack-dev-server on the start script, but this is not too elegant and done only for solving this problem:
"scripts": {
"build": "webpack",
"start": "npm run build && webpack-dev-server"
},
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels