guigrpa / docx-templates

Template-based docx report creation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Webpack build errors when including browser.js

koosvanderkolk opened this issue · comments

In my app I have:

import { createReport } from '@/plugins/browser';

and have added browser.js to the correct folder.

Nevertheless, when building my app:

C:\myapp\src\plugins\browser.js

   1:51     error  'globalThis' is not defined                                                no-undef
   1:19949  error  Empty block statement                                                      no-empty
   1:28355  error  Redundant double negation                                                  no-extra-boolean-cast
   1:70755  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   1:70967  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   1:71167  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   1:71415  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   1:71725  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   1:72004  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   1:72278  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   1:72628  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   1:72775  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   1:72821  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   1:73380  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   1:73403  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   1:73828  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   1:74198  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   1:75452  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   1:75473  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   1:76239  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   1:76418  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   1:76875  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   1:77116  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   1:77849  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   1:78029  error  Expected a 'break' statement before 'case'                                 no-fallthrough
   2:3513   error  Empty block statement                                                      no-empty
   2:15229  error  Redundant double negation                                                  no-extra-boolean-cast
   7:748    error  Expected method 'get' to always return a value                             getter-return
   7:766    error  Redundant double negation                                                  no-extra-boolean-cast
   7:865    error  Expected method 'get' to always return a value                             getter-return
   7:883    error  Redundant double negation                                                  no-extra-boolean-cast
   7:1634   error  'SharedArrayBuffer' is not defined                                         no-undef
   7:1669   error  'SharedArrayBuffer' is not defined                                         no-undef
   7:14264  error  'BigInt' is not defined                                                    no-undef
   7:14276  error  'BigInt' is not defined                                                    no-undef
   7:14288  error  'BigInt' is not defined                                                    no-undef
   7:14559  error  'BigInt' is not defined                                                    no-undef
   7:14571  error  'BigInt' is not defined                                                    no-undef
   7:14583  error  'BigInt' is not defined                                                    no-undef
   7:15814  error  'BigInt' is not defined                                                    no-undef
   7:15826  error  'BigInt' is not defined                                                    no-undef
   7:15838  error  'BigInt' is not defined                                                    no-undef
   7:16101  error  'BigInt' is not defined                                                    no-undef
   7:16113  error  'BigInt' is not defined                                                    no-undef
   7:16125  error  'BigInt' is not defined                                                    no-undef
   7:18143  error  'BigInt' is not defined                                                    no-undef
   7:18247  error  'BigInt' is not defined                                                    no-undef
   7:18258  error  'BigInt' is not defined                                                    no-undef
   7:18411  error  'BigInt' is not defined                                                    no-undef
   7:18515  error  'BigInt' is not defined                                                    no-undef
   7:18526  error  'BigInt' is not defined                                                    no-undef
   7:18689  error  'BigInt' is not defined                                                    no-undef
   7:18699  error  'BigInt' is not defined                                                    no-undef
   7:18798  error  'BigInt' is not defined                                                    no-undef
   7:18808  error  'BigInt' is not defined                                                    no-undef
   7:20150  error  'BigInt' is not defined                                                    no-undef
   7:20179  error  'BigInt' is not defined                                                    no-undef
   7:20278  error  'BigInt' is not defined                                                    no-undef
   7:20307  error  'BigInt' is not defined                                                    no-undef
   7:23322  error  'BigInt' is not defined                                                    no-undef
   7:23333  error  'BigInt' is not defined                                                    no-undef
   7:23349  error  'BigInt' is not defined                                                    no-undef
   7:23360  error  'BigInt' is not defined                                                    no-undef
   7:23771  error  'BigInt' is not defined                                                    no-undef
   7:32258  error  Do not access Object.prototype method 'hasOwnProperty' from target object  no-prototype-builtins
   7:33625  error  Setter cannot return a value                                               no-setter-return
   7:34715  error  Unexpected combined character in character class                           no-misleading-character-class
   7:35070  error  Unexpected combined character in character class                           no-misleading-character-class
  11:896    error  Do not access Object.prototype method 'hasOwnProperty' from target object  no-prototype-builtins
  17:6584   error  't' is already defined                                                     no-redeclare
  17:8142   error  't' is already defined                                                     no-redeclare
  17:9931   error  Expected a conditional expression and instead saw an assignment            no-cond-assign

Not sure why you're using the browser.js like that. You're using a bundler (webpack), so why not do import createReport from 'docx-templates';?