Does it work with a express and Prismic configuration in a webpack.config file ? #17
-
Hello, I have the following configuration in my project :
I would like to know if it is possible to generate a sitemap with this configuration, or it only works with a Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
I actually haven't tried to run it through an express app. But there is a file called generator.js. It's not directly exported, but you should be able to access it directly. You can pass it the same config that is sent to the next.config part. |
Beta Was this translation helpful? Give feedback.
-
Hey @orpheebesson so if you set the config option in the generator This is because the index.js file in the package determines the dir to place it in if it isn't specified. And then it calls the generator. Forgot about that :) But should work after that |
Beta Was this translation helpful? Give feedback.
Hey @orpheebesson so if you set the config option in the generator
publicPath: path.join(__dirname, 'public'),
it should create the file. You will actually find the one it's been generating innode_modules/@reecem/prismic-sitemap/public/sitemap.xml
This is because the index.js file in the package determines the dir to place it in if it isn't specified. And then it calls the generator. Forgot about that :) But should work after that