Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public createModuleSource(
module: StylableModule,
moduleId: string,
stylableResult: StylableResults,
css: string,
depth: string | number,
renderableOnly = false
) {
const moduleSource = generateModuleSource(
stylableResult,
moduleId,
[],
this.options.includeCSSInJS ? `${WEBPACK_STYLABLE}.$` : 'null',
`${WEBPACK_STYLABLE}.create`,
`${WEBPACK_STYLABLE}.createRenderable`,
css,
typeof depth === 'number' ? depth.toString() : depth,
'module.' + module.exportsArgument,
this.options.experimentalHMR
? `/* Webpack HMR */ if (module && module.hot) { module.hot.accept(); }`
: '',
renderableOnly
);
return new OriginalSource(moduleSource, module.resource);