{"action":"opened","issue":{"url":"https://api.github.com/repos/rollup/rollup/issues/2106","repository_url":"https://api.github.com/repos/rollup/rollup","labels_url":"https://api.github.com/repos/rollup/rollup/issues/2106/labels{/name}","comments_url":"https://api.github.com/repos/rollup/rollup/issues/2106/comments","events_url":"https://api.github.com/repos/rollup/rollup/issues/2106/events","html_url":"https://github.com/rollup/rollup/issues/2106","id":310305190,"number":2106,"title":"Use `exports: 'named'` to disable this warning","user":{"login":"kopax","id":1866564,"avatar_url":"https://avatars0.githubusercontent.com/u/1866564?v=4","gravatar_id":"","url":"https://api.github.com/users/kopax","html_url":"https://github.com/kopax","followers_url":"https://api.github.com/users/kopax/followers","following_url":"https://api.github.com/users/kopax/following{/other_user}","gists_url":"https://api.github.com/users/kopax/gists{/gist_id}","starred_url":"https://api.github.com/users/kopax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kopax/subscriptions","organizations_url":"https://api.github.com/users/kopax/orgs","repos_url":"https://api.github.com/users/kopax/repos","events_url":"https://api.github.com/users/kopax/events{/privacy}","received_events_url":"https://api.github.com/users/kopax/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-01T07:38:39Z","updated_at":"2018-04-01T07:38:39Z","closed_at":null,"author_association":"NONE","body":"I have an error with rollup  \r\n\r\n```bash\r\nsrc/index.js → dist/rollup-umd.min.js...\r\n(!) Mixing named and default exports\r\nConsumers of your bundle will have to use bundle['default'] to access the default export, which may not be what you want. Use `exports: 'named'` to disable this warning\r\ncreated dist/rollup-umd.min.js in 6.4s\r\n```\r\n\r\nLooking at my configuration, I have already set the exports to named : \r\n\r\n```js\r\n/* eslint-disable flowtype-errors/show-errors, no-console, import/extensions */\r\nimport nodeResolve from 'rollup-plugin-node-resolve';\r\nimport replace from 'rollup-plugin-replace';\r\nimport commonjs from 'rollup-plugin-commonjs';\r\nimport inject from 'rollup-plugin-inject';\r\nimport babel from 'rollup-plugin-babel';\r\nimport json from 'rollup-plugin-json';\r\nimport uglify from 'rollup-plugin-uglify';\r\nimport cleanup from 'rollup-plugin-cleanup';\r\nimport visualizer from 'rollup-plugin-visualizer';\r\nimport builtins from 'rollup-plugin-node-builtins';\r\nimport pkg from './package.json';\r\nimport declination from './declination.json';\r\nconst processShim = '\\0process-shim';\r\nconst prod = process.env.PRODUCTION;\r\nconst mode = prod ? 'production' : 'development';\r\nconst { external, globals } = declination;\r\n\r\nconsole.log(`Creating ${mode} bundle...`);\r\n\r\nconst output = prod ? [\r\n  { file: `dist/${pkg.name}.min.js`, format: 'umd' },\r\n] : [\r\n  { file: `dist/${pkg.name}.js`, format: 'umd' },\r\n  { file: `dist/${pkg.name}.es.js`, format: 'es' },\r\n];\r\n\r\nconst plugins = [\r\n  {\r\n    resolveId(importee) {\r\n      if (importee === processShim) return importee;\r\n      return null;\r\n    },\r\n    load(id) {\r\n      if (id === processShim) return 'export default { argv: [], env: {} }';\r\n      return null;\r\n    },\r\n  },\r\n  builtins(),\r\n  nodeResolve(),\r\n  commonjs({\r\n    include: 'node_modules/**',\r\n  }),\r\n  replace({\r\n    'process.env.NODE_ENV': JSON.stringify(prod ? 'production' : 'development'),\r\n  }),\r\n  inject({\r\n    process: processShim,\r\n  }),\r\n  json(),\r\n  babel({\r\n    plugins: ['external-helpers'],\r\n    exclude: 'node_modules/**',\r\n  }),\r\n  cleanup(),\r\n];\r\n\r\nif (prod) plugins.push(uglify(), visualizer({ filename: './bundle-stats.html' }));\r\n\r\nexport default {\r\n  input: 'src/index.js',\r\n  sourcemap: true,\r\n  name: pkg.name,\r\n  external,\r\n  exports: 'named',\r\n  output,\r\n  plugins,\r\n  globals,\r\n};\r\n```\r\n\r\nLooking at the module, the export looks fine : \r\n\r\n```js\r\n// end of flle rollup-umd.es.js ...\r\nexport { ReactDemo };\r\nexport default ReactDemoStyled;\r\n//# sourceMappingURL=rollup-umd.es.js.map\r\n```\r\n\r\nI have the following rollup version : \r\n\r\n```json\r\n{\r\n    \"rollup\": \"^0.51.8\",\r\n    \"rollup-plugin-babel\": \"^3.0.3\",\r\n    \"rollup-plugin-cleanup\": \"^2.0.0\",\r\n    \"rollup-plugin-commonjs\": \"^8.3.0\",\r\n    \"rollup-plugin-inject\": \"^2.0.0\",\r\n    \"rollup-plugin-json\": \"^2.3.0\",\r\n    \"rollup-plugin-node-builtins\": \"^2.1.2\",\r\n    \"rollup-plugin-node-resolve\": \"^3.2.0\",\r\n    \"rollup-plugin-replace\": \"^2.0.0\",\r\n    \"rollup-plugin-uglify\": \"^2.0.1\",\r\n    \"rollup-plugin-visualizer\": \"^0.4.0\",\r\n    \"rollup-watch\": \"^4.3.1\"\r\n}\r\n```"}}
{"actor":{"display_login":"kopax"}}