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

setWebpackPublicPath auto option #328

Open
danielweil opened this issue Jun 7, 2022 · 1 comment
Open

setWebpackPublicPath auto option #328

danielweil opened this issue Jun 7, 2022 · 1 comment

Comments

@danielweil
Copy link

Webpack supports "auto" value for publicPath.

Can this package support it too?

Would be excelent.

Thanks for all your work!

@danielweil
Copy link
Author

danielweil commented Jun 7, 2022

const setCustomWebpackPublicPath = (path) => (config) => { if (path) { if (path !== 'auto') { if (!(path.startsWith('http') || path.startsWith('https'))) { if (!path.startsWith('/')) { path = '/' + path; } } if (!path.endsWith('/')) { path = path + '/'; } } config.output.publicPath = path; } return config; };

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

1 participant