Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exports is not defined #40

Open
rohmanhm opened this issue Mar 4, 2017 · 5 comments
Open

exports is not defined #40

rohmanhm opened this issue Mar 4, 2017 · 5 comments
Labels
conflicts pure esmodules aka `{modules: false}` no transformation to commonjs

Comments

@rohmanhm
Copy link

rohmanhm commented Mar 4, 2017

When I use your plugin, everything with export default variableName works fine.
But when I export default object it's gonna throw error in console log.

Example

export default {
  state,
  actions,
  getters,
  mutations
} // it's gonna error. exports is not defined

And when I try to export default new object, it's throw error too

export default new Vuex.Store({
  actions,
  modules: {
    styles,
    panels,
    tools,
    elements,
    components
  },
  plugins: [snapshotPlugin]
})
@cdflove9426
Copy link

Webpack 2: "Uncaught ReferenceError: exports is not defined"

when using Webpack 2.2 with ES Modules, exports will be undefined. So if you keep using babel-plugin-add-module-exports, you'll see Uncaught ReferenceError: exports is not defined
Simply remove the 'add-module-exports' plugin and and you'll be able to use Webpack 2 modules.

@terion-name
Copy link

So this is no way to bring this plugin's functionality to Webpack 2.2 :(

@rohmanhm
Copy link
Author

@terion-name This still functional, but have some problem

@jasonsanjose
Copy link

@cyrilchapon
Copy link

up

@59naga 59naga added the conflicts pure esmodules aka `{modules: false}` no transformation to commonjs label Jun 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conflicts pure esmodules aka `{modules: false}` no transformation to commonjs
Projects
None yet
Development

No branches or pull requests

6 participants