Need to restart server after adding new example file
See original GitHub issueI don’t remember if this is a regression or not, but every time I add a new component I have to restart the server. Hot reloading works when I make changes to the component and the md file, but new files don’t get picked up.
Here is my config:
const path = require('path')
// Exit on end of STDIN
process.stdin.resume()
process.stdin.on('end', () => process.exit(0))
module.exports = {
title: 'My Style Guide',
sections: [
{
name: 'Forms',
components: './client/app/components/forms/**/*.js',
},
],
skipComponentsWithoutExample: true,
getExampleFilename(componentPath) {
return componentPath.replace(/\.js$/, '.examples.md')
},
getComponentPathLine(componentPath) {
const name = path.basename(componentPath, '.js')
const dir = path.dirname(componentPath.replace(/^client\/app/, ''))
return `import ${name} from 'app${dir}/${name}'`
},
updateWebpackConfig(webpackConfig) {
// Your source files folder or array of folders, should not include node_modules
const clientDir = path.join(__dirname, 'client')
webpackConfig.resolve.modules.unshift(clientDir)
webpackConfig.module.loaders.push(
// Babel loader will use your project’s .babelrc
{
test: /\.jsx?$/,
include: clientDir,
loader: 'babel',
},
{
test: /\.css$/,
include: [
path.dirname(require.resolve('ress')),
clientDir,
],
loaders: [
'style',
'css',
],
}
)
return webpackConfig
},
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
node - restart server after editing specific files - Stack Overflow
Use supervisor. Install it with npm install supervisor -g and launch your code with supervisor server.js and you should be good to go....
Read more >can we update the property file with out restarting the server
i have a scenario that i want to update the property file of an applicaton which is running in mmc ,from the another...
Read more >Do I need to restart my server after editing fstab and mtab?
To answer the question on rebooting: No, there is no need to reboot after ... its content will change after, say, a reboot,...
Read more >When the test server requires restarting - IBM
When an application is running on a server and you change the code, the Java™ virtual machine keeps running the initial code until...
Read more >How to correctly reset, restart, and recycle IIS websites
How and WHEN to restart and recycle your IIS website for maximum availability. ... You want to make sure that the web server...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, it’s working for me.
@tizmagik But that will require page reload in a browser?