Hello :wave: When running `jsBrowserDevelopmentRun...
# javascript
b
Hello 👋 When running
jsBrowserDevelopmentRun
, the compiled module is served under
<http://localhost:8080/myModule.js>
. While this generally makes sense, I would like it to be served under
<http://localhost:8080/someDirectory/myModule.js>
. Does anyone know if and how that can be accomplished ? Thanks
b
I think it's served using webpack dev server
you can place additional webpack config into webpack.config.d IIRC
not sure what the settings are exactly to make that work
h
Maybe this helps you, I think it's
publicPath
File:
webpack.config.d/webpack.config.js
Copy code
;(function(config) {
    config.mode = 'development'
    if(!config.hasOwnProperty('devServer')) {
        config.devServer = { }
    }
    config.devServer.host = 'developer.local'
    config.devServer.port = 8080
    config.devServer.devMiddleware = {
        publicPath: '/',
        mimeTypes: { "text/html": ["phtml"] },
    }
    config.devServer.historyApiFallback = true
})(config);
b
@Hildebrandt Tobias Thank you, that did the trick 🙂 (In my case adding a
webpack.config.d/config.js
file containing just the line
config.output.publicPath = "/someDirectory"
) was enough)
☺️ 1