-
Notifications
You must be signed in to change notification settings - Fork 74
Plugin doesn't work with webpack@2.2.0 #31
Comments
Although it has warning in webpack 2.2.0, but is still worked in my project. |
It turned out that the bug (or feature) was somewhere else. Webpack parser runs "call fn" callback only when fn is not defined in the code (I'm not sure why). const t = this.t;
t() the parser doesn't see I have to use |
I'm with this problem too |
Either do I, anyone knows how to fix it? |
I had to use acorn to be able to create translation service https://github.com/ckeditor/ckeditor5-dev/blob/master/packages/ckeditor5-dev-utils/lib/translations/translationservice.js, but it would be much nicer if the webpack could handle it by itself. |
@ma2ciek @d3viant0ne noticed it had been a couple weeks since this was last commented on, was hoping to see if there was some kind of resolution? Thanks for the help! |
I had to implement my own solution with usage of the Acorn parser, |
@alphapilgrim - There is a |
@ma2ciek looks like it's a current implementation of the webpack's Parser. See: I'm not sure why you want to replace the calls of defined functions, but looks like to affect them you have to register another callback for the Smthing like this: const BasicEvaluatedExpression = require('webpack/lib/BasicEvaluatedExpression');
// ...
parser.plugin(`evaluate defined Identifier ${name}`, function (expr) {
return new BasicEvaluatedExpression().setIdentifier(expr.name).setRange(expr.range);
}); |
I'm using webpack@2.2.0 and wanted to take a look at this plugin while working on the ckeditor/ckeditor5#387, but I got into few troubles.
compiler.parser.plugin
is deprecated now. So I changed this line into something like this:But unfortunately it seems to be not working now...
Could you provide some info how to fix it?
Regards, Maciek
The text was updated successfully, but these errors were encountered: