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

Support for _src/template/default.html compiling to _layouts/default.html in development server #27

Open
kmotoko opened this issue Feb 3, 2020 · 1 comment

Comments

@kmotoko
Copy link

kmotoko commented Feb 3, 2020

In reference to the issue #9 , I found a boolean setting for webpack-dev-server which enables writing the changed files to disk. You just need to add writeToDisk: true to the devServer part in webpack.dev.js:

  devServer: {
    contentBase: [
      path.resolve('_site'),
    ],
    hot: true,
    writeToDisk: true,
  },

The docs for the relevant option is here: https://webpack.js.org/configuration/dev-server/#devserverwritetodisk-

@sandoche
Copy link
Owner

sandoche commented Jun 10, 2020

@kmotoko did this work for you? I tried locally and it does not work for me. Maybe because I had t odowngrade webpack-dev-server. Can you do a PR with your working configuration?

I got the following:

[0] - configuration has an unknown property 'writeToDisk'. These properties are valid: [0] object { hot?, hotOnly?, lazy?, bonjour?, host?, allowedHosts?, filename?, publicPath?, port?, socket?, watchOptions?, headers?, clientLogLevel?, overlay?, progress?, key?, cert?, ca?, pfx?, pfxPassphrase?, requestCert?, inline?, disableHostCheck?, public?, https?, contentBase?, watchContentBase?, open?, useLocalIp?, openPage?, features?, compress?, proxy?, historyApiFallback?, staticOptions?, setup?, before?, after?, stats?, reporter?, reportTime?, noInfo?, quiet?, serverSideRender?, index?, log?, warn? }

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