I have a Vue view that loads some html and extracts the body-tag content from it. Vue return the following error:
./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/Inbox.vue Module parse failed: Invalid regular expression flag (170:43) You may need an appropriate loader to handle this file type.
My regex looks ok: I tested it here:
https://regex101.com/r/noPGfP/1
This is my (simplified) code:
export default {
name: "inbox",
methods: {
load(rs) {
_Api._get('load', {id: rs["uuid"]}).then((response) => {
if(response.status==200 && response.statusText=="OK") {
var html = response.body;
var body = html.match(/\<body[^\>]*\>(.*)\<\/body\>/si);
}
});
}
},
};