Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrated Webpack HTML Plugin. #1595

Merged
merged 23 commits into from
Sep 3, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
105c2cf
Integrated Webpack HTML Plugin.
revanth0212 Aug 23, 2019
19ccdc6
feat: support static from root in upward
Aug 26, 2019
98edf92
fixup: stop PWADevServer writing to disk
Aug 26, 2019
dc96399
Added manifest.json route.
revanth0212 Aug 26, 2019
bdadc3c
Added generic meta and link tags.
revanth0212 Aug 26, 2019
2af0516
Added fonts to template.html.
revanth0212 Aug 26, 2019
3e74464
Exposing store name using DefinePlugin.
revanth0212 Aug 26, 2019
3423195
Using process.env instead of template options.
revanth0212 Aug 26, 2019
ca1238c
Images fix.
revanth0212 Aug 26, 2019
bf489da
Added the webpack plugin to fetch backend url.
revanth0212 Aug 27, 2019
d094618
Integrated the media backend url fetcher plugin.
revanth0212 Aug 27, 2019
4ae107a
Route change for venia icons in manifest.json
revanth0212 Aug 27, 2019
96278ed
Minor change.
revanth0212 Aug 27, 2019
a829d19
Renaming storeName to STORE_NAME and snapshot updates.
revanth0212 Aug 28, 2019
616a47d
Files rearrage.
revanth0212 Aug 28, 2019
47e1435
Added tests for MediaBackendURLFetcherPlugin.
revanth0212 Aug 28, 2019
951c13c
Using html minification.
revanth0212 Aug 28, 2019
c09a285
Minor.
revanth0212 Aug 28, 2019
bc687e5
Replaced magentoMediaBackendURL with MAGENTO_MEDIA_BACKEND_URL.
revanth0212 Aug 28, 2019
49eadca
Added comments.
revanth0212 Aug 28, 2019
ca63832
Minor.
revanth0212 Aug 29, 2019
d5f15a1
Merge branch 'develop' into webpackHtmlPluginIntegration
dpatil-magento Aug 30, 2019
9b0c74c
Merge branch 'develop' into webpackHtmlPluginIntegration
dpatil-magento Sep 3, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/venia-concept/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"graphql-cli": "~3.0.11",
"graphql-cli-validate-magento-pwa-queries": "~1.0.0",
"graphql-tag": "~2.10.1",
"html-webpack-plugin": "~3.2.0",
"informed": "~2.1.13",
"lodash.over": "~4.7.0",
"memoize-one": "~5.0.0",
Expand Down
11 changes: 11 additions & 0 deletions packages/venia-concept/template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title><%= htmlWebpackPlugin.options.title %></title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to my self: need to check the meta tags in prev templates and try getting them into either here or the app logic.

</head>
<body>
<div id="root" />
</body>
</html>
9 changes: 9 additions & 0 deletions packages/venia-concept/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { configureWebpack } = require('@magento/pwa-buildpack');
const HTMLWebpackPlugin = require('html-webpack-plugin');

module.exports = async env => {
const config = await configureWebpack({
Expand Down Expand Up @@ -43,6 +44,14 @@ module.exports = async env => {
// Since it's a regular Webpack configuration, the object supports the
// `module.noParse` option in Webpack, documented here:
// https://webpack.js.org/configuration/module/#modulenoparse
revanth0212 marked this conversation as resolved.
Show resolved Hide resolved
config.plugins = [
...config.plugins,
new HTMLWebpackPlugin({
supernova-at marked this conversation as resolved.
Show resolved Hide resolved
title: 'Home Page - Venia',
filename: 'index.html',
template: './template.html'
})
];

return config;
};
Loading