-
Notifications
You must be signed in to change notification settings - Fork 893
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
Update webpack environment targets #4649
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ module.exports = (_, options = {}) => { | |
// `nvm install 8 && node ./src/cli` will run OpenSearch Dashboards | ||
// in node version 8 and babel will stop transpiling async/await | ||
// because they are supported in the "current" version of node | ||
node: 'current', | ||
node: 14, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need this change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Left as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I figured as much, what i worry is that this means that we dont benefit from any of the node 18 updates just because we build on node 14. I think we should build by default on the latest version of node and anyone who wants to use an older version can but they need to rebuild the artifacts themselves. We shouldnt build for 14 by default. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we package the artifacts of a release, consumers of those artifacts don't have the option of rebuilding. Also, since this the CommonJS part of the code that runs on the server, payload size it not a worry. |
||
}, | ||
|
||
// replaces `import "core-js/stable"` with a list of require statements | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,10 @@ | |
* under the License. | ||
*/ | ||
|
||
const { resolve } = require('path'); | ||
const browserlist = require('browserslist'); | ||
const targets = browserlist.loadConfig({ path: resolve(__dirname, '../..') }); | ||
Comment on lines
+31
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice, thanks for this change! |
||
|
||
module.exports = () => { | ||
return { | ||
presets: [ | ||
|
@@ -36,6 +40,7 @@ module.exports = () => { | |
{ | ||
useBuiltIns: 'entry', | ||
modules: false, | ||
targets, | ||
// Please read the explanation for this | ||
// in node_preset.js | ||
corejs: '3.2.1', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,5 +29,7 @@ | |
*/ | ||
|
||
module.exports = { | ||
plugins: [require('autoprefixer')()], | ||
plugins: [ | ||
/*require('autoprefixer')()*/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will be raising a PR on Today, they generate a ton of warnings about being not needed, masking important log messages. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A little more context here would help, not a blocker but where are these warnings generated? Also cant we just wait for the PR that fixes auto prefixer? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
However, what The change I will be proposing will allow consumers of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the preferred approach for these cases is a TODO comment that links to an issue - it allows someone in the future to just remove the commented code if they decide this issue is no longer valid. |
||
], | ||
}; |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This snapshot diff is pretty unintelligible to me, so I'm just assuming it's fine. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"extends": "./tsconfig.base.json", | ||
"compilerOptions": { | ||
"target": "es5", | ||
"target": "es2018", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the implication of this change? |
||
"module": "esnext", | ||
}, | ||
"include": [ | ||
|
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.