Skip to content

Don't publish babel configuration #109

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

Closed
gaspoute opened this issue Feb 19, 2018 · 2 comments
Closed

Don't publish babel configuration #109

gaspoute opened this issue Feb 19, 2018 · 2 comments

Comments

@gaspoute
Copy link

Hello,

I encountered an error while building my project:

./node_modules/portal-vue/dist/portal-vue.js        
Module build failed: ReferenceError: Unknown plugin "transform-vue-jsx" specified in "/home/gaspar/src/ipickupdimona/node_modules/portal-vue/package.json" at 0, attempted to resolve relative to "/home/gaspar/src/ipickupdimona/node_modules/portal-vue"
    at /home/gaspar/src/ipickupdimona/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17
    at Array.map (<anonymous>)
    at Function.normalisePlugins (/home/gaspar/src/ipickupdimona/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
    at OptionManager.mergeOptions (/home/gaspar/src/ipickupdimona/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
    at OptionManager.init (/home/gaspar/src/ipickupdimona/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at File.initOptions (/home/gaspar/src/ipickupdimona/node_modules/babel-core/lib/transformation/file/index.js:212:65)
    at new File (/home/gaspar/src/ipickupdimona/node_modules/babel-core/lib/transformation/file/index.js:135:24)
    at Pipeline.transform (/home/gaspar/src/ipickupdimona/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at transpile (/home/gaspar/src/ipickupdimona/node_modules/babel-loader/lib/index.js:50:20)
    at Object.module.exports (/home/gaspar/src/ipickupdimona/node_modules/babel-loader/lib/index.js:175:20)
 @ ./app/app.js 297:0-35
 @ multi ./app/app.js webpack-hot-middleware/client?reload=true

I solved it by moving the babel configuration of the package.json to a .babelrc file and adding it to the .npmignore. I think the problem is pretty much the same as that of v-tooltip.

Thanks :-)

@LinusBorg
Copy link
Owner

LinusBorg commented Feb 19, 2018

I'm not sure I understand the source of the problem. are you importing portal-vue from /src instead of one of the built version (which is already ES5)?

Or rather, do you not have node_modules ignored by babel-loader by default? That's not a good idea!

@gaspoute
Copy link
Author

Indeed, node_modules wasn't well ignored :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants