vaderjs 1.3.3-alpha-57 → 1.3.3-alpha-58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/vader.js +6 -3
package/package.json
CHANGED
package/vader.js
CHANGED
|
@@ -585,11 +585,12 @@ function Compiler(func, file) {
|
|
|
585
585
|
case path && path.includes('module.css'):
|
|
586
586
|
let css = await fs.readFileSync(process.cwd() + path, 'utf8')
|
|
587
587
|
css = css.replaceAll('.', '')
|
|
588
|
+
console
|
|
588
589
|
if (!name) {
|
|
589
590
|
throw new Error('Could not find name for css module ' + path + ' at' + beforeimport + ' file' + file)
|
|
590
591
|
}
|
|
591
|
-
newImport = `let ${name} = ${JSON.stringify(parse(css))}`
|
|
592
|
-
|
|
592
|
+
newImport = `let ${name} = ${JSON.stringify(parse(css.replaceAll('.', '').replace(/\s+/g, " ")))}`
|
|
593
|
+
|
|
593
594
|
break;
|
|
594
595
|
default:
|
|
595
596
|
let deep = path.split('/').length - 1
|
|
@@ -629,8 +630,10 @@ function Compiler(func, file) {
|
|
|
629
630
|
path = path.replace(/'/g, '').trim().replace(/"/g, '').trim()
|
|
630
631
|
path = path.replaceAll('.jsx', '.js');
|
|
631
632
|
path = path.replaceAll('../', '');
|
|
633
|
+
|
|
632
634
|
let css = fs.readFileSync(process.cwd() + '/' + path, 'utf8')
|
|
633
|
-
|
|
635
|
+
|
|
636
|
+
css = css.replaceAll('.', '')
|
|
634
637
|
newImport = `let ${name} = ${JSON.stringify(parse(css))}`
|
|
635
638
|
string = string.replace(beforeimport, newImport)
|
|
636
639
|
} else {
|