... | ... | @@ -4,7 +4,7 @@ Using the `@unitybase/ub-pub` package with WebPack has some specifics. |
|
|
UnityBase code is not ES5, it contains ES2015 constructs, like using `const` and `let` keywords, and other. That is why it needs to be transpiled first.
|
|
|
|
|
|
But a typical WebPack configuration explicitly includes project source code, which means all content of `node_modules` goes straight, not babelified.
|
|
|
That causes problems during build, because UnityBase code does use JavaScript features beyond ES5 standard.
|
|
|
That causes problems during build, because UnityBase code does use JavaScript features beyond the ES5 standard.
|
|
|
|
|
|
In order to workaround that, include `/@unitybase/` expression into configuration of `babel-loader`, like that:
|
|
|
```javascript
|
... | ... | |