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

I don't know in which subfolder my app will live #882

Closed
SimonMellerin opened this issue Jan 5, 2021 · 2 comments
Closed

I don't know in which subfolder my app will live #882

SimonMellerin opened this issue Jan 5, 2021 · 2 comments

Comments

@SimonMellerin
Copy link

SimonMellerin commented Jan 5, 2021

Hi,

Here is my use case:

I package a Symfony app.

  • The app can be install by anyone
  • An instance of this app can live at example.com and another at example.com/foo,
  • I want to release the app with assets & dependencies
    (final user who will install it do not have to use yarn or composer)

The problem is: webpack.config.js ask me to configure my public path before I compile, but I can't know it at this time.

I can't find such a use case in Symfony documentation, or in readme here.

Is there a way to tell Symonfy or Webpack Encore with a Symfony parameter that my app lives in a subfolder ?

Not sure if I'm clear here :/

Cheers
Simon

@stof
Copy link
Member

stof commented Jan 5, 2021

As soon as there is a dynamic import involved in the webpack output, webpack needs to know that path.

If there is no dynamic import, it might be possible to find a trick to let symfony/asset manage the subfolder prefix, but I never tried that.

@SimonMellerin
Copy link
Author

Thanks for your answer,

After looking at issues in webpack-encore-bundle, I think I will find a solution compiling infos from symfony/webpack-encore-bundle#19 and #88

This issue was closed.
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

2 participants