Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how do I have to configure webpack.config.js #62

Open
vdeppe opened this issue Jul 13, 2020 · 2 comments
Open

how do I have to configure webpack.config.js #62

vdeppe opened this issue Jul 13, 2020 · 2 comments

Comments

@vdeppe
Copy link

vdeppe commented Jul 13, 2020

Hello,
I want to use the livereload-plugin in my webApp. But somehow it doesn't work. My Webapp should run on port 8080,
which I have defined in devServer. Could you please check my file, which looks as follows?

`const CopyPlugin = require('copy-webpack-plugin');
var LiveReloadPlugin = require('webpack-livereload-plugin');

module.exports = {
plugins: [
new LiveReloadPlugin()
],
entry: {
bundle: ['./app/app.js']
},
output: {
path: __dirname + '/public',
filename: 'app.js'
},
module: {
rules: [
{
test: /.bpmn$/,
use: 'raw-loader'
}
]
},
devServer: {
port: 8080,
},
plugins: [
new CopyPlugin({
patterns: [
{ from: 'assets/', to: 'vendor/bpmn-js', context: 'node_modules/bpmn-js/dist/' },
{ from: '
/*.{html,css,png}', context: 'app/' },
],
}),
],
mode: 'development',
devtool: 'source-map'
};
`
thanks and kind regards

@statianzo
Copy link
Owner

This plugin doesn't serve your webpack assets. It handles livereload in apps that have their assets served by another process.

devServer is for configuring webpack-dev-server which may be what you need.

@crisamdegracia
Copy link

Took me many days to make webpack-dev-server work in WordPress coz it needs the HTML file, but I can't.
Finally this plugin works!

"webpack-livereload-plugin": "^3.0.1",
"webpack": "^5.33.2",
"webpack-cli": "^4.6.0",  

new LiveReloadPlugin({ protocol: "http", hostname : "understraptest.local", appendScriptTag: true, })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants