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

[webpack-focus] Default config should use DEV_MODE to initialize the OUTPUT_PUBLIC_PATH variable. #9

Closed
durandx opened this issue May 25, 2016 · 0 comments

Comments

@durandx
Copy link

durandx commented May 25, 2016

The following line is not a good idea : https://github.com/KleeGroup/webpack-focus/blob/master/webpack.config.js#L37

OUTPUT_PUBLIC_PATH = OUTPUT_PUBLIC_PATH !== undefined ? OUTPUT_PUBLIC_PATH : `http://${DEV_SERVER_HOST}:${DEV_SERVER_PORT}/`;

In the current form we need to set OUTPUT_PUBLIC_PATH to './' in "release mode" to prevent the loader from using localhost:3000/myfont.eot provided by webpack-dev-server

I think you should use the DEV variable to switch between DEV_SERVER_HOST or OUTPUT_PUBLIC_PATH. And you should also initialize OUTPUT_PUBLIC_PATH by default to './' like PACKAGE_JSON_PATH

@durandx durandx changed the title webpack-focus should use DEV_MODE to initialize the OUTPUT_PUBLIC_PATH variable. [webpack-focus] Default config should use DEV_MODE to initialize the OUTPUT_PUBLIC_PATH variable. May 25, 2016
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