I have a simple test setup for the strip loader which includes a file that has a single line containing console.log('File loaded!'); which is not being stripped properly. However, if I simply add a blank line to the top of the file and move the console.log('File loaded!'); statement to the second line then the strip loader works properly. It appears as though the strip loader always fails to match if a match exists on the first line of a file. My strip loader configuration is shown below.
var webpackStripLoader = require('strip-loader');
var stripLoaderSettings = {
test: /(\.js$|\.es6$)/,
exclude: /node_modules/,
loader: webpackStripLoader.loader('console.log')
}
I have a simple test setup for the strip loader which includes a file that has a single line containing
console.log('File loaded!');
which is not being stripped properly. However, if I simply add a blank line to the top of the file and move theconsole.log('File loaded!');
statement to the second line then the strip loader works properly. It appears as though the strip loader always fails to match if a match exists on the first line of a file. My strip loader configuration is shown below.