OfficeDev / Office-Addin-TaskPane-React

Template to get start started writing a TaskPane Office Add-in for the React framework using TypeScript
Other
54 stars 35 forks source link

Remove extra dot from packed manifest file #63

Closed villasv closed 3 years ago

villasv commented 3 years ago

The [ext] pattern already brings in a dot. Current behavior as seen from webpack build output:

asset manifest.dev..xml 4.12 KiB [emitted] [from: manifest.xml] [copied]
akrantz commented 3 years ago

@villasv Thanks for the pull request. You're seeing the file in dist folder created as "manifest.prod..xml"? Does this differ by platform? I have not seen a problem in the output before on Windows or Mac, so I am wondering if there is a specific scenario where it is an issue. Also, is this different for the React template from https://github.com/OfficeDev/Office-Addin-TaskPane ? If this applies to all of the templates, it would be best to the PR in that template, and we can merge the fix through to all of the other templates.

villasv commented 3 years ago

You're seeing the file in dist folder created as "manifest.prod..xml"?

Yes, manifest.prod..xml is what resides in my dist/ folder.

Does this differ by platform?

I first observed this on Windows, but after running a double-check, I've realized that this only happened because I've upgraded to Webpack@5 and didn't see this change in their migration guide. Sorry for not noticing it was a breaking change 😞

I guess this issue should be closed and added to the Office-Addin-Taskpane project as a webpack@5 migration-related issue? Not sure if upgrading is of your interest so I'll just close this one first.

akrantz commented 3 years ago

In the past, we had some issues when trying to move to webpack 5 so we have not done so yet. Were you able to use webpack v5?

villasv commented 3 years ago

I was, but I sliced up the project dependencies a bit (remove things I imagine you kept in the template for a reason). I removed all babel, polyfills and a few plugins. Here's the current diff:

https://www.diffchecker.com/QXhLQ2cq

akrantz commented 3 years ago

Thanks for sharing! This is really helpful to see. For the React template, we should really target the latest @fluentui/react library. It's good to see that you're able to use webpack 5 with the updated webpack plugins.

I created an issue for moving to webpack 5: https://github.com/OfficeDev/Office-Addin-TaskPane/issues/114

@millerds