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

add Symfony/WebpackEncoreBundle #4571

Merged
merged 8 commits into from
Dec 28, 2020
Merged

add Symfony/WebpackEncoreBundle #4571

merged 8 commits into from
Dec 28, 2020

Conversation

craigh
Copy link
Member

@craigh craigh commented Dec 25, 2020

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Fixed tickets fixes #3601
Refs tickets -
License MIT
Changelog updated yes

I'm not sure how best to proceed with providing final builds to end users through the distribution. In a normal situation, we would not commit the contents of /public/build to github. We could maybe do this in the distribution but this could be problematic if the user installs in a subdirectory.

currently the publicPath value in webpack.config.js is hard-coded to MY value /core.git/public/build - it would default to simply /build - because I work in a subdir all the time.

Adding this complicates the installation process but provides later flexibility to downline developers.

Additional things I thought of:

  • on install, need to confirm if installing in subdir and adjust setPublicPath('/build') in webpack.config.js
    • (must also setManifestKeyPrefix('build/') be enabled?)
    • also this path may be added to .gitignore (/public/build/)
  • can the installer run yarn encore dev ?

@craigh
Copy link
Member Author

craigh commented Dec 26, 2020

I guess one option would be to commit the contents of /public/build with default values. Then on install, do a simple string replace if the install is in a subdirectory.

Doing a search, it looks like there are instances of the path in

  • /public/build/manifest.json
  • /public/build/entrypoints.json
  • /public/build/runtime.js

opinions?

@craigh
Copy link
Member Author

craigh commented Dec 26, 2020

@Guite I think I have this ready now. It includes the default assets from webpack and on install, adjust the path if needed.

@craigh craigh requested a review from Guite December 26, 2020 22:38
Copy link
Member

@Guite Guite left a comment

Choose a reason for hiding this comment

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

Terrific 😄

@craigh craigh merged commit 4223226 into master Dec 28, 2020
@craigh craigh deleted the _webpack branch December 28, 2020 17:18
craigh added a commit to zikula/distribution that referenced this pull request Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Theme] consider webpack-encore
2 participants