-
Notifications
You must be signed in to change notification settings - Fork 92
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
Webpack 5 #1681
Webpack 5 #1681
Conversation
@miq-bot remove_label wip Works for me locally and travis is green, ready for reviews :) |
|
/cc @himdel |
Updated, sorry about the delay :) I've just added a .gitkeep file to ensure the directory exists and the build can create the file again. |
Gah sorry...this conflict was caused by #1694 |
Rebased on top of #1694 :) |
`import { deconstruct } from "foo.json"` only works while it's being mapped to `const { deconstruct } = require('foo.json');` proper import just returns a default blob, which can then be deconstructed
fails with webpack 5, this might be working out of the box
this means we can no longer import html files as `templateUrl` these will now import strings to use as `template`
perl -i -npe 's/import templateUrl from (["'\''])(.*)\1;?$/import template from '\''$2'\'';/' app/**/*.js perl -i -npe 's/^(\s*)templateUrl,?\s*$/$1template,\n/' app/**/*.js
manual changes to update remaining use of template urls to required template strings the one place where that doesn't work is navigation, because pf-notification-drawer assumes it can include templates by url, manually injecting the 3 template in $templateCache
dependency on a branch comes from #296 - migration from bower; bower used ~0.6.1 and novnc has since changed the npm package name, and released a new major
bring in line with gitignore and ui-classic
and clean up applianceInfo of boilerplate
without this, `yarn run test` fails with ERROR [plugin]: Cannot find plugin "/home/himdel/manageiq-ui-service/node_modules/karma-webpack"
fixes a bug from #833
… file so, chaging js/app.123456-hash.js to just that, in testing
was used for heroku, doesn't run now
bin/setup runs yarn rake test runs yarn run test and the travis script
generated during `yarn run build`
Checked commits https://github.com/himdel/manageiq-ui-service/compare/dd2c69b7c5c170e00ff48d13adbaa6b42fc1de67~...8b0203b91fc3f858f5ed99fde32419400939329b with ruby 2.6.3, rubocop 0.82.0, haml-lint 0.35.0, and yamllint **
|
Backported to
|
Webpack 5 (cherry picked from commit 8fbe42a)
Updates SUI to webpack 5.4, dropping a couple of obsolete plugins/loaders.
The bulk of the change is a change in how importing html files work - previously it would return an url for use in component definition, and create a corresponding entry in angular's
$templateCache
; now, it returns a the content in a string, which can be passed as the component template directly.Also updates novnc to current version, to prevent
'return' outside of function [vendor/noVNC/utils/parse.js:38,2]
.And drops yarn.lock for consistency with ui-classic (and to prevent all the commits full of yarn.lock).
And karma-webpack doesn't work with webpack5, running webpack before tests and using the built output works.
Closes #1691
Closes #1692
Closes #1695