Skip to content
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 'build' command to bundle for production #954

Merged
merged 14 commits into from Dec 10, 2021
Merged

Conversation

dafo
Copy link
Collaborator

@dafo dafo commented Nov 23, 2021

Closes #951
Closes #943
Closes #956

This should not be merged before investigating an issue when a template imports anything from 'igniteui-webcomponents'

Example error:

ERROR in ./node_modules/igniteui-webcomponents/index.js 1:2377-2456
Module not found: Error: Can't resolve './components/icon/icon.registry' in 'C:\work\github\igniteui-cli\output\IG Project 12\node_modules\igniteui-webcomponents'
Did you mean 'icon.registry.js'?
BREAKING CHANGE: The request './components/icon/icon.registry' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
@ ./src/app/badge/badge.ts 1:0-71 1:71-87 1:88-105
@ ./src/index.ts 1:69-98

@coveralls
Copy link

coveralls commented Nov 23, 2021

Coverage Status

Coverage decreased (-1.0008%) to 73.007% when pulling 058747e on amarinov/buildTaskWC into 68a55ff on master.

@dafo dafo marked this pull request as ready for review November 24, 2021 08:20
@dafo dafo requested a review from Lipata November 24, 2021 08:20
@dafo
Copy link
Collaborator Author

dafo commented Nov 24, 2021

This is fixed.
More information on that error -> here

Lipata
Lipata previously approved these changes Nov 24, 2021
Copy link
Member

@gmurray81 gmurray81 left a comment

Choose a reason for hiding this comment

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

Seems like that'll do the trick. Personally, I do like there to be a legacy mode so that you can build for older browser like in my example, but I think we were being told we didn't need to support IE111 any longer, and this certainly makes for a simpler webpack config. You might not technically need to force lit-html through babel if not supporting older browsers. The main reason I was doing that was because lit-html ONLY distributes esm modules, so in order to make them usable in ie11, they needed to be fed through babel. Similarly, you may not need to feed our stuff through babel either. You may be able to change the exclusion so that it just excludes all of node_modules.

Unless you want to try to add the legacy support, I'd see if it works fine by just excluding all of node_modules in the exclude statement

gmurray81
gmurray81 previously approved these changes Nov 25, 2021
@dafo dafo merged commit 1207438 into master Dec 10, 2021
@dafo dafo deleted the amarinov/buildTaskWC branch December 10, 2021 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants