Describe the bug
Stringify unexpectedly remove spaces and new lines from template literal
Steps to reproduce the behavior
stringify({
f: () => `
1
2
3
`,
})
result :
{"f":"_function_f|() => `123`"}
Expected result
{"f":"_function_f|() => `\n 1\n 2\n 3\n `"}
Environment
- OS: macOS
- Node.js version: v14.16.1
- NPM version: v7.24.2
- Browser (if applicable): chrome, firefox…
- Browser version (if applicable): firefox 101.0, chrome 102.0.5005.61
Additional context
Telejson is used under the hood of storybook and fail to "teleport" function containing template literal without loosing spaces and new line in webpack devServer environement.
Describe the bug
Stringify unexpectedly remove spaces and new lines from template literal
Steps to reproduce the behavior
result :
{"f":"_function_f|() => `123`"}Expected result
{"f":"_function_f|() => `\n 1\n 2\n 3\n `"}Environment
Additional context
Telejson is used under the hood of storybook and fail to "teleport" function containing template literal without loosing spaces and new line in webpack devServer environement.