phase2 / particle

A starter kit for using the prototyping tool, Pattern Lab, in tandem with a Drupal theme. Utilizes Webpack for all asset management.
https://phase2.gitbook.io/frontend/
GNU General Public License v2.0
317 stars 118 forks source link

JS error just after the install #755

Open reinis-me opened 4 years ago

reinis-me commented 4 years ago

Hi! I keep getting this JS error right after the installation of Particle (tried few different versions, latest and the 10.6.0) and it's all the same.

Uncaught SyntaxError: Invalid or unexpected token

Problem exists somewhere here: `// "./apps/drupal/drupal-jquery.js": /!****!*\ ! ./apps/drupal/drupal-jquery.js ! ****/ /! no exports provided / /*/ (function(module, webpack_exports, webpack_require) {

"use strict"; eval("webpack_require.r(webpack_exports);\n/ WEBPACK VAR INJECTION /(function(global) {/ harmony import / var jquery_dist_jquery_minWEBPACK_IMPORTED_MODULE_0 = webpack_require(/! jquery/dist/jquery.min / \"./node_modules/jquery/dist/jquery.min.js\");\n/ harmony import / var jquery_dist_jquery_minWEBPACK_IMPORTED_MODULE0default = /#PURE/webpack_require__.n(jquery_dist_jquery_minWEBPACK_IMPORTED_MODULE_0);\n\nglobal.jQuery = jquery_dist_jquery_minWEBPACK_IMPORTED_MODULE0default.a;\n/ WEBPACK VAR INJECTION /}.call(this, __webpack_require(/! ./../../node_modules/webpack/buildin/global.js / \"./node_modules/webpack/buildin/global.js\")))\n\n /***/ }), `

Any ideas? Thank you!

Update: happens only when NODE_ENV=development

reinis-me commented 4 years ago

Found a workaround changing webpack.particle.js:37

from devtool: NODE_ENV === 'development' ? 'eval' : 'source-map',

to devtool: NODE_ENV === 'development' ? 'source-map' : 'source-map',