Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hagevvashi/eae7c068d13cef179a3e38a249b9326b to your computer and use it in GitHub Desktop.
Save hagevvashi/eae7c068d13cef179a3e38a249b9326b to your computer and use it in GitHub Desktop.
html-webpack-pluginでindex.htmlを作る方法
plugins: [
new HtmlWebpackPlugin({
filename: "./index.html",
template: "src/index.tsx",
chunks: ["index"],
}),
...chunks.map(
([chunk]) =>
new HtmlWebpackPlugin({
filename: `./pages/${chunk}.html`,
// TODO: ここは適当。後から作る
template: "src/index.tsx",
chunks: [chunk],
})
),
],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment