Skip to content

Commit

Permalink
fix: remove chunks: ['app']
Browse files Browse the repository at this point in the history
  • Loading branch information
adamstankiewicz committed Jun 3, 2023
1 parent 2a78f67 commit d28200c
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 29 deletions.
7 changes: 6 additions & 1 deletion config/data/paragonUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,12 @@ function getParagonCacheGroups(paragonThemeCss) {

/**
* @param {ParagonThemeCss} paragonThemeCss The Paragon theme CSS metadata.
* @returns {Object.<string, string>} The entry points for the Paragon theme CSS.
* @returns {Object.<string, string>} The entry points for the Paragon theme CSS. Example: ```
* {
* "paragon.theme.core": "/path/to/node_modules/@edx/paragon/dist/core.min.css",
* "paragon.theme.variants.light": "/path/to/node_modules/@edx/paragon/dist/light.min.css"
* }
* ```
*/
function getParagonEntryPoints(paragonThemeCss) {
const entryPoints = {};
Expand Down
7 changes: 7 additions & 0 deletions config/webpack.common.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ const paragonThemeCss = getParagonThemeCss(process.cwd());
module.exports = {
entry: {
app: path.resolve(process.cwd(), './src/index'),
/**
* The entry points for the Paragon theme CSS. Example: ```
* {
* "paragon.theme.core": "/path/to/node_modules/@edx/paragon/dist/core.min.css",
* "paragon.theme.variants.light": "/path/to/node_modules/@edx/paragon/dist/light.min.css"
* }
*/
...getParagonEntryPoints(paragonThemeCss),
},
output: {
Expand Down
1 change: 0 additions & 1 deletion config/webpack.dev.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ module.exports = merge(commonConfig, {
new HtmlWebpackPlugin({
inject: true, // Appends script tags linking to the webpack bundles at the end of the body
template: path.resolve(process.cwd(), 'public/index.html'),
chunks: ['app'],
FAVICON_URL: process.env.FAVICON_URL || null,
OPTIMIZELY_PROJECT_ID: process.env.OPTIMIZELY_PROJECT_ID || null,
NODE_ENV: process.env.NODE_ENV || null,
Expand Down
70 changes: 44 additions & 26 deletions example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@edx/paragon": "21.0.0-alpha.30",
"@edx/paragon": "^21.0.0-alpha.31",
"react": "16.14.0",
"react-dom": "16.14.0"
},
Expand Down

0 comments on commit d28200c

Please sign in to comment.