-
Couldn't load subscription status.
- Fork 13
Open
Description
I keep getting this issue after trying to use the scss comment parser:
code.replace is not a function
TypeError: code.replace is not a function
at unifyLineEndings (http://localhost:6060/static/preview.bundle.js:52937:17)
at CommentExtractor.extract (http://localhost:6060/static/preview.bundle.js:52974:12)
at Parser.parse (http://localhost:6060/static/preview.bundle.js:52782:28)
at Object.<anonymous> (http://localhost:6060/static/preview.bundle.js:52253:23)
at __webpack_require__ (http://localhost:6060/static/preview.bundle.js:677:30)
at fn (http://localhost:6060/static/preview.bundle.js:88:20)
at http://localhost:6060/static/preview.bundle.js:41388:10
at ConfigApi._renderMain (http://localhost:6060/static/preview.bundle.js:46217:20)
at render (http://localhost:6060/static/preview.bundle.js:46243:17)
at ConfigApi.configure (http://localhost:6060/static/preview.bundle.js:46268:9)
This is the code I currently have:
const ScssCommentParser = require('scss-comment-parser');
const annotations = {
_: {
alias: {
'aliasTest': 'annotationTest'
}
},
annotationTest: function ( commentLine ) {
return 'Working';
}
};
const parser = new ScssCommentParser( annotations );
const scss = require('../front/scss/config.scss')
const comments = parser.parse( scss )
console.log(comments);
Probably I'm doing something wrong but the scss const returns an empty object. Are u loading the scss in a different way?
Thanks
Metadata
Metadata
Assignees
Labels
No labels