diff --git a/nuxt.config.js b/nuxt.config.js index 76289ab74..33c32f9f3 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -239,12 +239,12 @@ export default { use: 'yaml-loader', }); config.module.rules.push({ - test: /.js/, + test: /\.js$/, loader: 'string-replace-loader', options: { // To load .json files inside of .js files of type module in a node environment, // one has to either load from the filesystem or via a created require(). - // While a load vie filesystem is very unfriendly to webpack, + // While a load via filesystem is very unfriendly to webpack, // the explicit creation of a require() function can be removed. // This probably gets replaced in the future by a `import from with { type: 'json' }` // statement, which is currently (2023-12) experimental in node and not well supported in webpack. @@ -261,12 +261,8 @@ export default { ], }, }); - config.module.rules.push({ - test: /\.mjs$/, - include: /node_modules/, - type: 'javascript/auto', - }); }, + transpile: ['markdown-it'], }, env: { ENV: process.env.ENV,