Although the title may not be very descriptive, I am currently experimenting with the 'xstate' library and running into an issue with an 'Unexpected token' error in my build result.
Here is a snippet from my webpack configuration file (webpack.config.js):
var WebpackBuildNotifierPlugin = require('webpack-build-notifier');
var webpackConfig = {
// Configuration details omitted for brevity
};
module.exports = [
webpackConfig
];
Upon inspecting the generated bundle.js file after building the code, I noticed a section that appears to be triggering the 'Unexpected token' error:
u
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))ndefined
The 'xstate' library is being imported and utilized in the following manner within my project:
import * as React from 'react';
import { Machine, interpret } from 'xstate';
// Code snippet showcasing usage of xstate library