1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 3× 3× 3× 3× 3× 1× 1× 3× 1× 1× | import { readFileSync } from 'fs' import { join } from 'path' import { isRelative, getRootPath } from 'ethical-utility-path' import { generateModuleID } from 'ethical-utility-resolve-module-node' const source = (path) => { const css = readFileSync(path, 'utf8').replace(/\'/g, '"') return `module.exports = '${css.trim()}'` } const resolveCSSModule = (path) => { const key = generateModuleID(path) return { key, path, source } } export default resolveCSSModule |