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

[Bug report] @babel/[email protected] may have some problems. #601

Closed
tyrion-yu opened this issue Jun 17, 2018 · 3 comments
Closed

[Bug report] @babel/[email protected] may have some problems. #601

tyrion-yu opened this issue Jun 17, 2018 · 3 comments
Labels
type: enhancement Request to enhance an existing feature

Comments

@tyrion-yu
Copy link

Bug report

Version

0.10.1

Steps to reproduce

add .vuepress/theme/Layout.vue

<template>
    <Layout>
        <div class="secrecy" slot="page-bottom">
            My footer.
        </div>
    </Layout>
</template>

<script>
  import Layout from '@default-theme/Layout.vue';

  export default {
    components: {
      Layout,
    },
  };
</script>

package.json

"devDependencies": {
    "babel-core": "^6.26.3",
    "babel-loader": "^7.1.4",
    "babel-preset-env": "^1.7.0",
}

add .babelrc to your root dir

{
    "presets": ["env"]
}

run vuepress dev then:

WARNING in ./docs/.vuepress/theme/Layout.vue?vue&type=script&lang=js 1:276-279
"export 'default' (imported as 'mod') was not found in '-!../../../node_modules/cache-loader/dist/cjs.js??ref--3-0!../../../node_modules/vuepress/node_modules/babel-loader/lib/index.js??ref--3-1!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Layout.vue?vue&type=script&lang=js'
 @ ./docs/.vuepress/theme/Layout.vue
 @ ./node_modules/vuepress/lib/app/.temp/routes.js
 @ ./node_modules/vuepress/lib/app/app.js
 @ ./node_modules/vuepress/lib/app/clientEntry.js
 @ multi ./node_modules/vuepress/lib/app/clientEntry.js

The VuePress Site Broken.

What is expected?

remove the file .babelrc, then everything is FINE.

What is actually happening?

The VuePress use babel@^7.0.0-beta.47 which is incompatible with the project using babel@^6.x.

Other relevant information

  • Your OS: macOS Sierra 10.12.6
  • Node.js version: v8.9.4
  • Browser version: chrome@latest
  • Is this a global or local install? Both are not Okey.
  • Which package manager did you use for the install? yarn
@genert
Copy link

genert commented Jun 19, 2018

+1 here. Any ideas?

@hoopyfroody
Copy link

+1, babel 7 is choking on my base project babel 6 .babelrc and presets

@ulivz ulivz added the type: enhancement Request to enhance an existing feature label Jun 22, 2018
@ulivz
Copy link
Member

ulivz commented Aug 20, 2018

It should be fixed at c500201.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Request to enhance an existing feature
Projects
None yet
Development

No branches or pull requests

4 participants