Closed fsuter closed 2 years ago
Thanks. Need to have a look at the version of typo3/cms-composer-installers
One solution (or is more of a workaround?) proposer by @avogt1701 in https://github.com/TYPO3/CmsComposerInstallers/issues/131 is to redirect the output of the build to public/build
instead of inside an extension. To be complete, in case anyone wants to implement this solution, here is how the configuration can look like. First the webpack configuration (webpack.config.js
):
const config = Encore
.setOutputPath('../../public/build')
.setPublicPath('/build')
...
The first path is relative to where the webpack.config.js
file is located, the second is absolute (within the web root). The TypoScript constants need to be adapted too:
plugin.tx_typo3encore {
settings {
# These paths are relative to the web root (public) directory
entrypointJsonPath = build/entrypoints.json
manifestJsonPath = build/manifest.json
}
}
This seems the best solution so far. Would you like to add your insights into the Readme? That would be very nice. Thanks for your work.
@fsuter Thanks for sharing!
This seems the best solution so far. Would you like to add your insights into the Readme? That would be very nice. Thanks for your work.
Done with https://github.com/fsuter/typo3_encore/commit/d551b48364b9015d33f713d88c2ee1c04e7f1a4c
I have a TYPO3 v11 project using the upcoming v4 of typo3/cms-composer-installers. With the new installer script, the assets are not in
public/typo3conf/ext/my_extension/Resources/Public
anymore, but accessible via symlinks inpublic/_assets
, with the symlinks being named with some kind of hashes. How do you point to assets with this new system? How should a configuration (such as the one below) be updated?Sorry if this has been answered elsewhere already.