{"action":"created","issue":{"url":"https://api.github.com/repos/lobsteropteryx/esri-webpack/issues/5","repository_url":"https://api.github.com/repos/lobsteropteryx/esri-webpack","labels_url":"https://api.github.com/repos/lobsteropteryx/esri-webpack/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/lobsteropteryx/esri-webpack/issues/5/comments","events_url":"https://api.github.com/repos/lobsteropteryx/esri-webpack/issues/5/events","html_url":"https://github.com/lobsteropteryx/esri-webpack/issues/5","id":174794145,"number":5,"title":"How to set up arcgis js in my webpack config.","user":{"login":"CHQGIT","id":19716909,"avatar_url":"https://avatars.githubusercontent.com/u/19716909?v=3","gravatar_id":"","url":"https://api.github.com/users/CHQGIT","html_url":"https://github.com/CHQGIT","followers_url":"https://api.github.com/users/CHQGIT/followers","following_url":"https://api.github.com/users/CHQGIT/following{/other_user}","gists_url":"https://api.github.com/users/CHQGIT/gists{/gist_id}","starred_url":"https://api.github.com/users/CHQGIT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CHQGIT/subscriptions","organizations_url":"https://api.github.com/users/CHQGIT/orgs","repos_url":"https://api.github.com/users/CHQGIT/repos","events_url":"https://api.github.com/users/CHQGIT/events{/privacy}","received_events_url":"https://api.github.com/users/CHQGIT/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-09-02T16:05:11Z","updated_at":"2016-09-05T18:19:17Z","closed_at":null,"body":"Hello,\r\nIm pretty new on this webpack worlds and i need some help to set up the arcgis js api in my webpack.config,js.\r\n\r\nIm developing an app with:\r\nReact,\r\nWebpack dev server\r\nGulp\r\n\r\nI have the following config in my webpack file:\r\n\r\n> var path = require('path');\r\n> var esri = require('esri');\r\n> \r\n> module.exports = {\r\n>   entry: {\r\n>     login: './static/js/bundles/login.js',\r\n>     dashboard: './static/js/bundles/dashboard.js,\r\n> .... //more modules here \r\n> \r\n>   },\r\n>   output: {\r\n>     path: path.join(path.join(__dirname, 'dist'), 'js'),\r\n>     filename: '[name].js'\r\n>   },\r\n>   devServer: {\r\n>     inline: true,\r\n>     port: 443,\r\n>     host: \"127.0.0.1\"\r\n>   },\r\n>   module: {\r\n>     loaders: [\r\n>      {\r\n>        test: /\\.(js|jsx)$/,\r\n>        exclude: /node_modules/,\r\n>        loader: 'babel',\r\n>        query: {\r\n>          presets: ['react', 'es2015', 'stage-2']\r\n>        }\r\n>      }\r\n>    ]\r\n>  },\r\n>  externals: [\r\n>      function(context, request, callback) {\r\n>          if (/^dojo/.test(request) ||\r\n>              /^dojox/.test(request) ||\r\n>              /^dijit/.test(request) ||\r\n>              /^esri/.test(request)\r\n>          ) {\r\n>              return callback(null, \"amd \" + request);\r\n>          }\r\n>          callback();\r\n>      }\r\n>  ]\r\n> };\r\n> \r\n\r\nWhat else i need to do? I have read a lot of githubs but i still dont know how to do it.\r\n\r\nIn my index,html page i have the api in this way:\r\n <script src=\"arcgis_js_api/library/3.16/3.16/init.js\"></script>\r\nCuz i installed it following the tutorial, editing the dojo and init js files and putting the url from my server, in this case localhost:443 where wp server is being loaded.\r\n\r\nWhen i start the server with npm run start i have the following error:\r\n\r\n> cannot fin module 'esri'\r\n\r\nSo how i set up the arcgis api with the config that i have using webpack step by step?\r\n\r\nThanks in advice for ur help!\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/lobsteropteryx/esri-webpack/issues/comments/244795381","html_url":"https://github.com/lobsteropteryx/esri-webpack/issues/5#issuecomment-244795381","issue_url":"https://api.github.com/repos/lobsteropteryx/esri-webpack/issues/5","id":244795381,"user":{"login":"darklilium","id":8507515,"avatar_url":"https://avatars.githubusercontent.com/u/8507515?v=3","gravatar_id":"","url":"https://api.github.com/users/darklilium","html_url":"https://github.com/darklilium","followers_url":"https://api.github.com/users/darklilium/followers","following_url":"https://api.github.com/users/darklilium/following{/other_user}","gists_url":"https://api.github.com/users/darklilium/gists{/gist_id}","starred_url":"https://api.github.com/users/darklilium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darklilium/subscriptions","organizations_url":"https://api.github.com/users/darklilium/orgs","repos_url":"https://api.github.com/users/darklilium/repos","events_url":"https://api.github.com/users/darklilium/events{/privacy}","received_events_url":"https://api.github.com/users/darklilium/received_events","type":"User","site_admin":false},"created_at":"2016-09-05T18:19:17Z","updated_at":"2016-09-05T18:19:17Z","body":"I have the following when for example i want to do this in a jsx file to use the api:\r\nimport FeatureLayer from 'esri/layers/FeatureLayer'; \r\n\r\n Uncaught ReferenceError: __WEBPACK_EXTERNAL_MODULE_484__ is not defined"}}
{"actor":{"display_login":"darklilium"}}