Closed niieani closed 7 years ago
Just wanted to say that among the mentioned issues here and in the referenced ticket, also metadata needs to go from the root webpack config object to somewhere else.
This will involve changes at least in -core -config-css -config-aurelia -config-env-development & production
One way could be to load it via:
plugins: [
new webpack.LoaderOptionsPlugin({
metadata: {
port: process.env.WEBPACK_PORT || 9000,
host: process.env.WEBPACK_HOST || 'localhost',
ENV: process.env.NODE_ENV || process.env.ENV || 'development',
HMR: hasProcessFlag('hot') || !!process.env.WEBPACK_HMR,
}
}),
However i'm not so certain about this and also not about how to retrieve these values afterwards. Anyone with more knowledge about webpack might be able to help here.
I know how to solve this, it's just time that I haven't got. :/ Very much open to PRs on the matter though.
Sure, maybe i can help. My problem is just that i'm a webpack newbie and need a push in the right direction. :)
If you have the time can you quickly tell me where i can put the metadata in the config? Is my approach from above valid(via loaderoptionsplugin´)?
And if so, how can i retrieve the values from the easy-webpack plugins themself? Because this.root.metadata will not work anymore.
Fixed. Use latest major versions of all configs and the new stripMetadata
function before exporting your config.
See https://github.com/aurelia/skeleton-navigation/issues/670.
┆Issue is synchronized with this Asana task