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
Angular 15 compatibility #19875
Angular 15 compatibility #19875
Conversation
"@angular-devkit/architect": ">=0.1500.0", | ||
"@angular-devkit/build-angular": ">=15.0.0", | ||
"@angular-devkit/core": ">=15.0.0", | ||
"@angular/cli": ">=15.0.0", | ||
"@angular/common": ">=15.0.0", | ||
"@angular/compiler": ">=15.0.0", | ||
"@angular/compiler-cli": ">=15.0.0", | ||
"@angular/core": ">=15.0.0", | ||
"@angular/forms": ">=15.0.0", | ||
"@angular/platform-browser": ">=15.0.0", | ||
"@angular/platform-browser-dynamic": ">=15.0.0", |
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.
If this works...
I assume we're going to have to think about how to make this backwards compatible?
@@ -27,7 +23,7 @@ export type StorybookBuilderOptions = JsonObject & { | |||
tsConfig?: string; | |||
compodoc: boolean; | |||
compodocArgs: string[]; | |||
styles?: ExtraEntryPoint[]; | |||
styles?: BrowserBuilderOptions['styles']; |
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.
Yeah I think you're on the right track.. in my investigation I also landed on some styles.entry/runtime being the source of the problem.
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 found that this file: runtime~styles.iframe.bundle.js
ran into this stack trace:
./node_modules/webpack-hot-middleware/client.js?reload=true&quiet=false&noInfo=undefined (vendors-node_modules_angular-devkit_build-angular_node_modules_css-loader_dist_runtime_api_js-dbea25.iframe.bundle.js:169259)
__webpack_require__ (runtime~styles.iframe.bundle.js:28)
__webpack_exec__ (main.iframe.bundle.js:1854)
(anonymous) (main.iframe.bundle.js:1855)
__webpack_require__.O (runtime~styles.iframe.bundle.js:72)
(anonymous) (main.iframe.bundle.js:1856)
webpackJsonpCallback (runtime~styles.iframe.bundle.js:1077)
(anonymous) (runtime~styles.iframe.bundle.js:1091)
(anonymous) (runtime~styles.iframe.bundle.js:1093)
(anonymous) (runtime~styles.iframe.bundle.js:1099)
And the code that was breaking looked like this:
/***/ "./node_modules/webpack-hot-middleware/client.js?reload=true&quiet=false&noInfo=undefined":
/*!************************************************************************************************!*\
!*** ./node_modules/webpack-hot-middleware/client.js?reload=true&quiet=false&noInfo=undefined ***!
\************************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var __resourceQuery = "?reload=true&quiet=false&noInfo=undefined";
/* module decorator */ module = __webpack_require__.nmd(module);
/*eslint-env browser*/
/*global __resourceQuery __webpack_public_path__*/
var options = {
path: '/__webpack_hmr',
timeout: 20 * 1000,
overlay: true,
reload: false,
log: true,
warn: true,
name: '',
autoConnect: true,
overlayStyles: {},
overlayWarnings: false,
ansiColors: {}
};
if (true) {
var overrides = Object.fromEntries(new URLSearchParams(__resourceQuery.slice(1)));
setOverrides(overrides);
}
if (typeof window === 'undefined') {
// do nothing
} else if (typeof window.EventSource === 'undefined') {
console.warn("webpack-hot-middleware's client requires EventSource to work. " + 'You should include a polyfill if you want to support this browser: ' + 'https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events#Tools');
} else {
if (options.autoConnect) {
connect();
}
}
failing on:
__webpack_require__.nmd
This error happened:
TypeError: __webpack_require__.nmd is not a function
at ./node_modules/webpack-hot-middleware/client.js?reload=true&quiet=false&noInfo=undefined (vendors-node_modules_angular-devkit_build-angular_node_modules_css-loader_dist_runtime_api_js-dbea25.iframe.bundle.js:169260:53)
at __webpack_require__ (runtime~styles.iframe.bundle.js:28:33)
at __webpack_exec__ (main.iframe.bundle.js:1854:48)
at main.iframe.bundle.js:1855:148
at __webpack_require__.O (runtime~styles.iframe.bundle.js:72:23)
at main.iframe.bundle.js:1856:56
at webpackJsonpCallback (runtime~styles.iframe.bundle.js:1077:39)
at Array.forEach (<anonymous>)
at runtime~styles.iframe.bundle.js:1091:31
at runtime~styles.iframe.bundle.js:1093:13
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.
on a build storybook we see this error:
|
I found out that when running storybook I see this in the terminal output:
I'm not sure this is right? Edit.. yes that's fine.. |
I ran the actual angular app, and noticed this in their HTML: <script src="runtime.js" type="module"></script>
<script src="polyfills.js" type="module"></script>
<script src="styles.js" defer></script>
<script src="vendor.js" type="module"></script>
<script src="main.js" type="module"></script> notice how runtime, polyfills are type=modules I think this might be related. We verified that this structure is the same in |
Closing in favor of #19937 |
Issue: #19878
What I did
How to test
If your answer is yes to any of these, please make sure to include it in your PR.