HTML source of error document used in my personal website
Below shows some basic setup steps.
This project is developed using Node.js 12. The version is already specified in the .nvmrc
file. Suggest to run nvm use
when you enter the project folder.
Install yarn packages in project root folder first using yarn install
.
Run yarn start
in project root folder.
Run yarn build
in project root folder.
Below shows some available configuration options.
To add or edit Webpack alias, modify resolve.alias
in webpack/webpack.base.conf.js
.
The APP_GTM_ID
is located in .env
file.
Webpack is configured to build and output a single HTML file.
html-inline-css-webpack-plugin
is used to inject CSS inline./webpack/utils/InlineChunkHtmlPlugin.js
is introduced fromreact-dev-utils
to inject JS files as inline chunk. The file is slightly modified to add ability to clean up assets. (TODO: Code a custom plugin)