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

Multisite setup #7

Closed
dGilli opened this issue Dec 3, 2018 · 6 comments
Closed

Multisite setup #7

dGilli opened this issue Dec 3, 2018 · 6 comments

Comments

@dGilli
Copy link

dGilli commented Dec 3, 2018

Since the plugin grabs the siteUrl and the language segments get attached to the path. Twigpack does not find the manifest files while on anything other than the primary site.

'siteUrl' => [
    'en' => getenv('CRAFTENV_SITE_URL') . 'en/',
    'de' => getenv('CRAFTENV_SITE_URL') . 'de/' ,
    'fr' => getenv('CRAFTENV_SITE_URL') . 'fr/',
],
@dGilli dGilli closed this as completed Dec 4, 2018
@FreakyFlu
Copy link

what was the solution here? Facing the same issue

@fthues
Copy link

fthues commented Aug 26, 2019

Same here. Did you find a solution, @dGilli ?

@dGilli
Copy link
Author

dGilli commented Sep 13, 2019

I got it to work just as Andrew describes in #24.

@puck3000
Copy link

Care to share the relevant parts of your general.php and twigpack settings? I seem to be missing something… 

@kristiansp
Copy link

kristiansp commented Dec 2, 2019

@puck3000 I've just been grappling with this too, and finally found a solution that works for me, at least. Basically setting the server config to absolute paths with environmental variables:

NB! This assumes that your BASE_URL ends with a /, as I just discovered when deploying this to server.

        // Public server config
        'server' => [
            'manifestPath' => getenv('BASE_URL') . 'dist/',
            'publicPath' => getenv('BASE_URL'),
        ],

@umkasanki
Copy link

guys, avoid using urls in 'manifestPath', this may not work on some servers.

andrew.welchYesterday at 7:10 PM
'manifestPath' => getenv('BASE_URL') . '/build/',
should be a file system path like maybe:
'manifestPath' => '@webroot/build/',
or something (depending on your setup)

working multilangual config:

'server' => [
	'manifestPath' => '@root/web/build/', // eg '/opt/approot/current/web/build/',
	'publicPath' => getenv('BASE_URL') . '/', // eg 'https://site.com/'
],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants