//- the including one
include ./shared-mixin
+sharedMixin()
The problem behind this is this part of code assumes the loaded content is exactly string, but babel-loader would add "use strict";\n ${theString}; around it. So this part of code cannot parse it anymore.
In Webpack 3, babel-loader is not included as post loader somehow. Though this it seems to be a bug of Webpack 3 instead of feature.
Maybe we can have some more reliable way to load the file content?
Hi, I'm using this loader with babel-loader as post loader of this one. But it would break for the included
.pug
files after upgraded to Webpack 4.The Webpack config I'm using:
And the pug code:
The problem behind this is this part of code assumes the loaded content is exactly string, but babel-loader would add
"use strict";\n ${theString};
around it. So this part of code cannot parse it anymore.In Webpack 3,
babel-loader
is not included as post loader somehow. Though this it seems to be a bug of Webpack 3 instead of feature.Maybe we can have some more reliable way to load the file content?
If it's OK I can send a PR for this.