ITADN

When you modify the .stories file, the modified screen does not apply immediately.

#146ClosedPlush777 创建于 2025-07-28
P
Plush777commented
Link to the project where the problem occurs. https://github.com/Plush777/Astro-static-template I'm developing an Astro build so that I can see styled HTML directly in the build file. https://github.com/ocavue/astrobook/issues/85 There is an example of Astrobook setting in the closed issue, so I set it as it is, When I went to http://localhost:4321/astrobook, I checked that the astrobook page came out well and the components worked well. However, there is a problem with the .stories file. The behavior of the problem is as follows. 1. Run the development server with yarn dev and access http://localhost:4321/astrobook. 2. And modify the TestComponent name to another name in the src/stories/AstroCounter.stories file, or add and save new objects. ```js // src/stories/AstroCounter.stories.js //before export const TestComponent = { args: {}, }; //after export const Test = { args: {}, }; ``` 3. When the code is modified, it should be modified to Test rather than TestComponent on the http://localhost:4321/astrobook screen, but it still appears as the pre-modification screen. 4. It's no use pressing f5, ctrl + f5, and if you run the development server again, it will be applied to the modified screen. Is there a reason why this happens only when I change the code in the .stories file? Or is it because of postprocess-html.js? This script runs when you build an astro project without affecting the development server.
关闭于 2025-07-29 0 条评论