You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.configureDevServerOptions((options)=>{options.host="0.0.0.0";options.allowedHosts="all";options.port=5173;// switch port to vite standard });
My .ddev/config.yaml for exposing the port:
# expose port for webpack encore dev serverweb_extra_exposed_ports:
- name: node-jscontainer_port: 5173http_port: 5172https_port: 5173
I tried to move the --public setting to webpack.config.js, because I wanted to use it like that:
.configureDevServerOptions((options)=>{options.host="0.0.0.0";options.allowedHosts="all";options.port=5173;// switch port to vite standard // new:options.public=`${process.env.DDEV_PRIMARY_URL}:5173`;});
That gave me the error:
[webpack-cli] Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options has an unknown property 'public'. These properties are valid:
object { allowedHosts?, bonjour?, client?, compress?, devMiddleware?, headers?, historyApiFallback?, host?, hot?, http2?, https?, ipc?, liveReload?, magicHtml?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, port?, proxy?, server?, setupExitSignals?, setupMiddlewares?, static?, watchFiles?, webSocketServer? }
Task failed: Exec command'npm run dev'in container/service 'web': exit status 2
module.exports={devServer: {client: {// Can be `string`://// To get protocol/hostname/port from browser// webSocketURL: 'auto://0.0.0.0:0/ws'webSocketURL: {hostname: "0.0.0.0",pathname: "/ws",port: 8080,},},},};
Always ended up with localhost:8080 in dist/manifest.json.
Two questions:
Is --public a special CLI feature provided by Webpack Encore?
Will it be removed in future versions?
Thanks very much in advance! I can provide a demo repository if needed of course.
(A future workaround would be to parse manifest.json via PHP and replace localhost:8080 of course). Might also be related to #1202
The text was updated successfully, but these errors were encountered:
Hi, thanks so much for providing webpack-encore, awesome tool!
I'm a bit confused about the recent changes.
For the usage in Docker tool DDEV I use the following config and invoke encore dev-server with
--public
:That allowed me to achieve the following
manifest.json
-output with the DDEV url instead of localhost:My
webpack.config.js
is the following:My
.ddev/config.yaml
for exposing the port:I tried to move the
--public
setting towebpack.config.js
, because I wanted to use it like that:That gave me the error:
I saw this guide (https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md) for migration, but I was not able to use the v4 version correctly?
Always ended up with
localhost:8080
indist/manifest.json
.Two questions:
--public
a special CLI feature provided by Webpack Encore?Thanks very much in advance! I can provide a demo repository if needed of course.
(A future workaround would be to parse manifest.json via PHP and replace
localhost:8080
of course). Might also be related to #1202The text was updated successfully, but these errors were encountered: