-
Notifications
You must be signed in to change notification settings - Fork 56
Closed
Description
Hi
I've been trying to get string-replace-loader to work with the 'g' flag.
...
loader: 'string-replace-loader', query: { search: 'REST_API', replace: 'test', flags: 'g' }
That doesn't seem to work out. If I remove the 'g' flag and set '' or 'i' as flag, it works perfectly. But 'g' flag always brings back the following error:
ERROR in ./~/css-loader?sourceMap!./~/vue-loader/lib/style-compiler?{"id":"data-v-84da6350","scoped":false,"hasInlineConfig":false}!./~/vue-loader/lib/selector.js?type=styles&index=0!./~/string-replace-loader?{"search":{},"replace":"test","flags":"g"}!./src/components/something/Test.vue
Module build failed: TypeError: Cannot read property 'content' of undefined
at Object.module.exports (/home/inzanez/WebDevel/testapp/node_modules/vue-loader/lib/selector.js:18:27)
@ ./~/vue-style-loader!./~/css-loader?sourceMap!./~/vue-loader/lib/style-compiler?{"id":"data-v-84da6350","scoped":false,"hasInlineConfig":false}!./~/vue-loader/lib/selector.js?type=styles&index=0!./~/string-replace-loader?{"search":{},"replace":"test","flags":"g"}!./src/components/something/Test.vue 4:14-409 13:3-17:5 14:22-417
@ ./src/components/something/Test.vue
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js
Any idea what might be wrong here?oO
itsMattShull, ryym, beautifulBoys and syuilo
Metadata
Metadata
Assignees
Labels
No labels