-
Notifications
You must be signed in to change notification settings - Fork 4
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
Release 1.83.1 #1058
Merged
Merged
Release 1.83.1 #1058
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tldr: Changing `module` config changes the syntax used to import/export in the compiled code. The new value, "ES6", means that the code compiled by TS will include import/export statements. That code is then further compiled by Webpack, which removes the imports/exports during concatenation. Using ES6 import/exports in the typescript output improves Webpack's tree-shaking. (Or really...enables it. I believe webpack does not treeshake unless the input uses ES6 import/export syntax.) Related: TS has several sort of settings related to the syntax used in output: - `lib`: determines the default/builtin type definitions that are included when typechecking your code. - `target`: Spcecies environment in which your code is going to run, and controls how Typescript downlevels your code. > "The `target` setting changes which JS features are downleveled and which are left intact. For example, an arrow function `() => this` will be turned into an equivalent function expression if target is ES5 or lower." `target` determines the default value of `lib`. If `target` is ES5, you probably want `lib` to be ES5, too, unless you're doing further transpilation with another tool (like babel). - `module`: Determines the syntax used for exports. - `moduleResolution` determines how module identifiers ("some/thing" in like `import x from "some/thing"`) are interpretted.
* refactor: old course theme removed * removed some old course theme files from base theme
Nanogallery2 includes hammerjs, screenfull, shifty, and images loaded as modules embedded in its source code; see https://github.com/nanostudio-org/nanogallery2/blob/d6056652705360e19ab330095f489f438a9e9d1c/src/jquery.nanogallery2.core.js#L11-L15. In browsers, Nanogallery2 intends to expose those objects on the global Window. However, bundling with Webpack messes up the way Nanogallery2 exposes those objects. (NG checks if `exports` is undefined, but Webpack defines an `eports` object itself.) Consequently, naive inclusion of Nanogallery2 in a webpack build does not work. To work around this, we previously were including those 4 dependencies separately and manually attaching them to global Window object, which is the workaround suggested at nanostudio-org/nanogallery2#98 (comment). This approach has several downsides, e.g: extra js; need to make sure we are including the correct versions of the 4 dependencies. A cleaner approach is to use imports-loader, as suggested nanostudio-org/nanogallery2#98 (comment).
Netlify Deployments: |
Lighthouse results: results for https://ocw-hugo-themes-www-pr-1058--ocw-next.netlify.app/:
results for https://ocw-hugo-themes-www-pr-1058--ocw-next.netlify.app/search/:
results for https://ocw-hugo-themes-course-v2-pr-1058--ocw-next.netlify.app/:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Chris Chudzicki
Abdurrehman
Carey P Gumaer