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

Fix webpack.config.js for v4/v5 #9

Open
joemin opened this issue Feb 2, 2022 · 0 comments
Open

Fix webpack.config.js for v4/v5 #9

joemin opened this issue Feb 2, 2022 · 0 comments

Comments

@joemin
Copy link

joemin commented Feb 2, 2022

Hey, thanks for a great tutorial! Super helpful for understanding what's given "for free" by create-react-app.

I think the webpack.config.js is still using the syntax for v3.

For the devServer key, I think it should be:

    devServer: {
        static : {
          directory : path.join(__dirname, "public/")
        },
        port: 3000,
        devMiddleware:{
           publicPath: "https://localhost:3000/dist/",
        },
        hot: "only",
    },

as shown in https://stackoverflow.com/questions/69102254/webpack-options-has-an-unknown-property-hotonly-invalid-options-object-dev-s

Thanks!

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