Configuration
Last updated
Last updated
Enhance the file src/app/spartacus/spartacus-configuration.module.ts
with the following config:
Start the spartacus instance as you would normally do: npm run dev
(or your defined npm script)
Open your browser
Notice the message in the console: [MSW] Mocking enabled.
All mocked calls are still normally visible in the network tab of your browser's developer tools
You can customize the mock server by defining more option for the mockConfig
in the file src/main.ts
:
For more information how you can configure the mock server, see the page of the api reference.
For more information how you can define your mock-data, see the page.
For more information about the underlying Mock Service Worker tool, see the .