Skip to content

WRN-18582: Migrate to webpack5 - #90

Merged
hong6316 merged 8 commits into
feature/webpack5from
feature/WRN-18582
Mar 23, 2022
Merged

WRN-18582: Migrate to webpack5#90
hong6316 merged 8 commits into
feature/webpack5from
feature/WRN-18582

Conversation

@MikyungKim

@MikyungKimMikyungKim commented Mar 21, 2022

Copy link
Copy Markdown
Contributor

Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)

Checklist

  • I have read and understand the contribution guide
  • A CHANGELOG entry is included
  • At least one test case is included for this feature or bug fix
  • Documentation was added or is not needed
  • This is an API breaking change

Issue Resolved / Feature Added

Migrated to webpack5

Resolution

Updated APIs of plugins
Added #66
Added ILIB_ADDITIONAL_RESOURCES_PATH as defined constants to resolve process is undefined

Additional Considerations

Verbose plugin needs to be fixed in WRN-19252
Warning related to Compliation.assets needs to be fixed in WRN-19249

Links

WRN-18582

Comments

Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
Comment threadplugins/PrerenderPlugin/index.js Outdated
const templates = require('./templates');
const vdomServer = require('./vdom-server-render');

const preRenderPluginHooksMap = new WeakMap();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this name be preRender...? or can be changed to prerender...?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆗

return {head, prerender};
}

// Injects assets into html

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those 3 functions(injectAssetsIntoHtml, minifyHtml, postProcessHtml) are copies of html-webpack-plugin`s.
Is it impossible that use htmlPluginData.plugin?

@MikyungKimMikyungKimMar 21, 2022

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are now moved to private functions. I can't reach the postProcessHtml function so I had to move these to here.

Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
@hong6316

hong6316 commented Mar 22, 2022

Copy link
Copy Markdown
Contributor

to @MikyungKim ,
could you answer the below questions?

  • commands/pack.js
    new option --ilib-additional-path added, is it for wp5?

  • config/webpack.config.js
    new ILibPlugin parameter ilibAdditionalResourcesPath added, is it for wp5?

  • while enact pack,
    .ttf files in dist/node_modules/@ enact are double-coloned(ex: Sandstone_Icons..ttf)
    I think we need to check this

  • enact serve not work

  • enact pack --verbose not work(verbose log not printed)

@MikyungKim

MikyungKim commented Mar 22, 2022

Copy link
Copy Markdown
ContributorAuthor

to @MikyungKim , could you answer the below questions?

  • commands/pack.js
    new option --ilib-additional-path added, is it for wp5?
  • config/webpack.config.js
    new ILibPlugin parameter ilibAdditionalResourcesPath added, is it for wp5?

Yes. It's related to the process is undefined issue. enact i18n had process.env access from Loader and glue, so we need to embed the environment variable into the plugin. The enact fix is enactjs/enact#3034.

  • while enact pack,
    .ttf files in dist/node_modules/@ enact are double-coloned(ex: Sandstone_Icons..ttf)
    I think we need to check this

🤔 I'm not sure. let's check.

  • enact serve not work

I tested and it's working. Let me check with you.

  • enact pack --verbose not work(verbose log not printed)

It'll be handled in the other ticket as I mentioned in the ticket.

Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)

@hong6316hong6316 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hong6316
hong6316 merged commit 9a5cd1e into feature/webpack5Mar 23, 2022
@hong6316
hong6316 deleted the feature/WRN-18582 branch March 23, 2022 00:21
hong6316 added a commit that referenced this pull request Apr 11, 2022
* WRN-18582: Migrate to webpack5 (#90)
* WRN-18582: webpack5 initial commit
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* WRN-18582: Migrated isomorphic and snapshot plugin
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* update verbose plugin
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* fix travis errors
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* update dependencies
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* fix
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* fix based on review
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* update shrinkwrap
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* WRN-12124: Remove deprecated babel-eslint module (#87)
* use @babel/eslint-parser
* remove babel-preset-react-app
* remove @babel/eslint-parser
* Revert "remove @babel/eslint-parser"
This reverts commit 98ec872.
* Revert "remove babel-preset-react-app"
This reverts commit 70a93e2.
* Revert "use @babel/eslint-parser"
This reverts commit 5c15b55.
* babel-eslint -> @babel/eslint-parser
* add CHANGELOG.md
* Update package.json
Co-authored-by: Mikyung Kim <mikyung27.kim@lge.com>
* update npm-shrinkwrap.json
* removed unused dependency
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* update eslint-config-prettier
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
Co-authored-by: Mikyung Kim <mikyung27.kim@lge.com>
* WRN-19252: Fix VerboseLogPlugin is not working (#91)
* WRN-19252: Use ProgressPlugin from originated place
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* pinned webpack version
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* WRN-12748: Update eslint 8 related modules (#88)
* update eslint 8
* Update package.json
* Update package.json
Co-authored-by: Mikyung Kim <mikyung27.kim@lge.com>
Co-authored-by: Mikyung Kim <mikyung27.kim@lge.com>
* WRN-19694: Support for React18 (#92)
* update react version
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* update dependencies
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* WRN-19694: Add react18 support
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* fix
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* WRN-20218: Fix eanct pack --framework and --externals options (#93)
* WRN-20218: Fix enact pack --framework
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* fix context
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* fix lint
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* fix local node_modules files and files ends with .js module id
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* fix
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* WRN-20481: Fixed miss made module id and miss referenced library (#94)
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* Fix prerendering regex
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
* update dependencies
Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)
Co-authored-by: taeyoung.hong <35059065+hong6316@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@MikyungKim@hong6316