After these changes I get a new error message:
Error message
jojo@jojo:/mnt/c/Users/j/Desktop/tg/test$ ./node_modules/.bin/webpack /mnt/c/Users/j/Desktop/tg/test/webpack.config.js:11 path.resolve(__dirname, 'app/js/lib/polyfill.js'), ^ SyntaxError: Unexpected token . at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:374:25) at Object.Module._extensions..js (module.js:417:10) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Module.require (module.js:354:17) at require (internal/module.js:12:17) at requireConfig (/mnt/c/Users/j/Desktop/tg/test/node_modules/webpack/bin/convert-argv.js:96:18) at /mnt/c/Users/j/Desktop/tg/test/node_modules/webpack/bin/convert-argv.js:109:17 at Array.forEach (native)
[details=Config file]// webpack.config.js: var path = require('/mnt/c/Users/j/Desktop/tg/test/'); //var webpack = require('webpack'); module.exports = { resolve: { extensions: ['.js', '.jsx'] }, entry: { path.resolve(__dirname, 'app/js/lib/polyfill.js'), path.resolve(__dirname, 'app/vendor/jquery/jquery.min.js'), path.resolve(__dirname, 'app/js/lib/config.js'), path.resolve(__dirname, 'app/js/init.js'), path.resolve(__dirname, 'app/js/offline_manager.js'), path.resolve(__dirname, 'app/vendor/jquery.nanoscroller/nanoscroller.js'), path.resolve(__dirname, 'app/vendor/angular/angular.js'), path.resolve(__dirname, 'app/vendor/angular/angular-route.js'), path.resolve(__dirname, 'app/vendor/angular/angular-animate.js'), path.resolve(__dirname, 'app/vendor/angular/angular-sanitize.js'), path.resolve(__dirname, 'app/vendor/angular/angular-touch.js'), path.resolve(__dirname, 'app/vendor/ui-bootstrap/ui-bootstrap-custom-tpls-0.12.0.js'), path.resolve(__dirname, 'app/vendor/angular-media-player/angular-media-player.js'), path.resolve(__dirname, 'app/vendor/jsbn/jsbn_combined.js'), path.resolve(__dirname, 'app/vendor/cryptoJS/crypto.js'), path.resolve(__dirname, 'app/vendor/rusha/rusha.js'), path.resolve(__dirname, 'app/vendor/zlib/gunzip.min.js'), path.resolve(__dirname, 'app/vendor/closure/long.js'), path.resolve(__dirname, 'app/vendor/leemon_bigint/bigint.js'), path.resolve(__dirname, 'app/vendor/libwebpjs/libwebp-0.2.0.js'), path.resolve(__dirname, 'app/vendor/angularjs-toaster/toaster.js'), path.resolve(__dirname, 'app/vendor/clipboard/clipboard.js'), path.resolve(__dirname, 'app/js/lib/utils.js'), path.resolve(__dirname, 'app/js/lib/bin_utils.js'), path.resolve(__dirname, 'app/js/lib/tl_utils.js'), path.resolve(__dirname, 'app/js/lib/ng_utils.js'), path.resolve(__dirname, 'app/js/lib/i18n.js'), path.resolve(__dirname, 'app/js/lib/mtproto.js'), path.resolve(__dirname, 'app/js/lib/mtproto_wrapper.js'), path.resolve(__dirname, 'app/js/app.js'), path.resolve(__dirname, 'app/js/services.js'), path.resolve(__dirname, 'app/js/controllers.js'), path.resolve(__dirname, 'app/js/filters.js'), path.resolve(__dirname, 'app/js/messages_manager.js'), path.resolve(__dirname, 'app/js/message_composer.js'), path.resolve(__dirname, 'app/js/directives.js'), path.resolve(__dirname, 'app/js/directives_mobile.js'), }, output: { path: path.resolve(__dirname, 'app/dist'), filename: 'main.js', publicPath: 'app/dist/' }, devtool: 'source-map' }
[/details]
I also tried to let it look like this (./app/bla.js
) but then I get this error:
Error message
jojo@jojo:/mnt/c/Users/j/Desktop/tg/test$ ./node_modules/.bin/webpack module.js:328 throw err; ^ Error: Cannot find module '/mnt/c/Users/j/Desktop/tg/test/' at Function.Module._resolveFilename (module.js:326:15) at Function.Module._load (module.js:277:25) at Module.require (module.js:354:17) at require (internal/module.js:12:17) at Object.<anonymous> (/mnt/c/Users/j/Desktop/tg/test/webpack.config.js:3:12) at Module._compile (module.js:410:26) at Object.Module._extensions..js (module.js:417:10) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Module.require (module.js:354:17)
[details=Config file]
// webpack.config.js: var path = require('/mnt/c/Users/j/Desktop/tg/test/'); //var webpack = require('webpack'); module.exports = { resolve: { extensions: ['.js', '.jsx'] }, entry: { app: ['./app/js/lib/polyfill.js', './app/js/lib/config.js', './app/js/init.js', './app/js/offline_manager.js', './app/js/lib/utils.js', './app/js/lib/bin_utils.js', './app/js/lib/tl_utils.js', './app/js/lib/ng_utils.js', './app/js/lib/i18n.js', './app/js/lib/mtproto.js', './app/js/lib/mtproto_wrapper.js', './app/js/app.js', './app/js/services.js', './app/js/controllers.js', './app/js/filters.js', './app/js/messages_manager.js', './app/js/message_composer.js', './app/js/directives.js', './app/js/directives_mobile.js'], vendors:['./app/vendor/jquery/jquery.min.js', './app/vendor/jquery.nanoscroller/nanoscroller.js', './app/vendor/angular/angular.js', './app/vendor/angular/angular-route.js', './app/vendor/angular/angular-animate.js', './app/vendor/angular/angular-sanitize.js', './app/vendor/angular/angular-touch.js', './app/vendor/ui-bootstrap/ui-bootstrap-custom-tpls-0.12.0.js', './app/vendor/angular-media-player/angular-media-player.js', './app/vendor/jsbn/jsbn_combined.js', './app/vendor/cryptoJS/crypto.js', './app/vendor/rusha/rusha.js', './app/vendor/zlib/gunzip.min.js', './app/vendor/closure/long.js', './app/vendor/leemon_bigint/bigint.js', './app/vendor/libwebpjs/libwebp-0.2.0.js', './app/vendor/angularjs-toaster/toaster.js', './app/vendor/clipboard/clipboard.js'] }, output: { path: './app/dist', filename: 'main.js', publicPath: 'app/dist/' }, devtool: 'source-map' }
[/details]