Created
November 24, 2020 16:52
-
-
Save hagevvashi/eae7c068d13cef179a3e38a249b9326b to your computer and use it in GitHub Desktop.
html-webpack-pluginでindex.htmlを作る方法
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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