-
Notifications
You must be signed in to change notification settings - Fork 72
feat: provide a mechanism to extend the remotes and shared fields of webpack config
#382
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
Conversation
Webpack 5 doesn't provide shims for built-in node packages, so we need to provide one for `path` ourselves given that `@clayui/css` uses it. We choose `path-browserify` because webpack itself suggests it. And we blindly believe and follow what webpack says.
…gmented This is necessary for project-specific imports and shared packages.
When an `export default ...` is placed in a file the build failed unless it was an `export default ... from ...`.
| "metal-tools-soy": "4.3.2", | ||
| "mini-css-extract-plugin": "0.11.2", | ||
| "minimist": "^1.2.0", | ||
| "path-browserify": "^1.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sure @wincent will love this 😍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * This object must represent the current configuration status of the portal's | ||
| * project if we don't want to break the build. It contains, for each | ||
| * federation-enabled project, the packages that are federated. | ||
| * The following two arrays are roughly equivalent to the old default preset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out that I was wrong in the previous PR and it didn't make too much sense to mix imports and federation because the model is a bit different.
| dependencies: | ||
| execa "^1.0.0" | ||
|
|
||
| path-browserify@^1.0.1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmmm, I love the smell of new dependencies in the morning....
🚁 🔥
|
As agreed with @jbalsas in a slack conversation I'm merging this to avoid blocking the server side PR. If we want to add changes later we can do it without any problem. |

See IFI-2310.
The changes here are needed to build and deploy this branch.
I will release a new version of
npm-scriptsafter this is merged which, BTW, should be the last that we need unless we add new features or fix bugs, because I have added all information contained in the old default preset (see this commit) given that it doesn't fail the build. In addition, it has been made extensible, so..., that should be enough.As always this has been tested locally with the linked private branch of
liferay-portal.I will send the portal's PR as soon as we release a new version of npm-scripts.