Skip to content
Discussion options

You must be logged in to vote

Does "to run with node" mean use the webpack loader?

Run with node means to have such code in Node:

import content from './my-compiled-mdx.js'

No, the sentence can be split like this:

a) please use compile, write to a file, and then run with Node
b) or use one of the Integrations

Node can load JavaScript files itself, it does not need a bundler such as esbuild/webpack/rollup.

I was wondering how is this any safer than directly evaluating in the browser?

evaluate(compile(x)) is just as safe in Node as in Deno as in a browser. It’s equivalent to using an integration. The problem stems from why and how people use it. And those reasons are more often not a good idea / unsafe.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tmfelwu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants