UNPKG

@cocreate/webpack

Version:

A Webpack integration tool for CoCreate applications, enabling file watching, automated chunking, lazy loading, and file uploading. It leverages CoCreate.config for streamlined project builds and development workflows.

21 lines (19 loc) 723 B
module.exports = function (source) { return source.replace(/\$'/g, '\\u0024\''); // const specialChars = /[\0\x08\x09\x1a\n\r"'\\\%\$]/g; // Add or remove characters based on your needs // const replacements = { // // "\0": "\\0", // // "\x08": "\\b", // // "\x09": "\\t", // // "\x1a": "\\z", // // "\n": "\\n", // // "\r": "\\r", // // "\"": "\\\"", // // "'": "\\'", // // "\\": "\\\\", // // "%": "\\%", // "$": "\\$" // Escape for MongoDB and others // // ... add more replacements as needed for other databases // }; // return source.replace(specialChars, (char) => (replacements[char] || char)); };