... | ... | @@ -8,15 +8,15 @@ That causes problems during build, because UnityBase code does use JavaScript fe |
|
|
|
|
|
In order to workaround that, include /@unitybase/ expression into configuration of `babel-loader`, like that:
|
|
|
```javascript
|
|
|
{
|
|
|
test: /\.js$/,
|
|
|
loader: 'babel-loader',
|
|
|
include: [
|
|
|
resolve('src'),
|
|
|
resolve('test'),
|
|
|
/@unitybase/
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
test: /\.js$/,
|
|
|
loader: 'babel-loader',
|
|
|
include: [
|
|
|
resolve('src'),
|
|
|
resolve('test'),
|
|
|
/@unitybase/
|
|
|
]
|
|
|
},
|
|
|
```
|
|
|
|
|
|
Once this is done, WebPack will start to use `babel-loader` for UnityBase packets, which causes another problem - by default, Babel won't work with CommonJS modules.
|
... | ... | |