Open gloriaJun opened 5 years ago
"html-webpack-plugin": "^3.2.0",
TITLE=Conduit API_URL=https://conduit.productionready.io/api
plugins: [ new HtmlWebpackPlugin({ template: `${TEMPLATE_DIRNAME}/${TEMPLATE_ENTRY_FILENAME}`, favicon: `${TEMPLATE_DIRNAME}/favicon.ico`, filename: TEMPLATE_ENTRY_FILENAME, title: process.env.TITLE, }), ],
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <title><%= htmlWebpackPlugin.options.title %></title> </head> <body> <noscript>You need to enable JavaScript to run this app.</noscript> <div id="root"></div> </body> </html>
Version
"html-webpack-plugin": "^3.2.0",
env file
webpack config file
public/index.html
Reference