html-webpack-inline-source-plugin
is no longer maintained, as reported in this issue on GitHub.
So I think it needs to update the example that uses webpack
in figma/plugin-examples. This will also allow you to upgrade to webpack@5. It can do these by following these steps.
- Uninstall
html-webpack-inline-source-plugin
and installreact-dev-utils
. - Update
html-webpack-plugin
to v4 or higher. - Update
webpack.config.js
of each project to look like the following source code.
// ---
const InlineChunkHtmlPlugin = require("react-dev-utils/InlineChunkHtmlPlugin");
module.exports = (env, argv) => ({
// ---
plugins: [
new HtmlWebpackPlugin({
template: "./src/ui.html",
filename: "ui.html"
}),
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/ui/]),
],
});
- After confirming that the build is successful, upgrade
webpack
to v5 and other packages.
I look forward to feedbacks, Thx.