-
Notifications
You must be signed in to change notification settings - Fork 74
PreflightCheck Error #267
Comments
Could u paste in your rollup & babel configs? I think you are relaying on babel's removed option |
I think the option useESModules of @babel/plugin-transform-runtime caused the problem. I used https://github.com/vuejs/vue-cli to create the project, my bable config: module.exports = {
presets: ['@vue/app']
}; my rollup config: import globby from 'globby';
import vue from 'rollup-plugin-vue';
import css from 'rollup-plugin-css-only';
import babel from 'rollup-plugin-babel';
const files = globby.sync(['packages/**']);
export default files.map((file) => {
return {
input: file,
output: {
file: file.replace('packages', 'dist').replace('.vue', '.js'),
format: 'cjs'
},
plugins: [vue({ css: false }), css(), babel()],
external: (id) => {
return id.startsWith('.') || id === 'vue';
}
};
}); |
Could you file an issue (or check if there is any already about it) in vue-cli repo? They have a little bit outdated dependencies - https://github.com/vuejs/vue-cli/blob/528c46507a21b76f12bc416d98f9b04c0076cb50/packages/%40vue/babel-preset-app/package.json#L24-L30 For the time being it seems that you should downgrade your rollup-plugin-babel to 4.0.0-beta.7 |
They had upgraded recently: vuejs/vue-cli#2642 |
Could u prepare a repro case? What kind of an error do you see? What is the output code? |
I made a minimal repo to reproduce: git clone [email protected]:zsky/rollup-plugin-babel-issue267.git
cd rollup-plugin-babel-issue267
npm i
npm run build Then outputed a error:
I logged the code, the import _inherits from "@babel/runtime/helpers/es6/inherits"; |
The installed @vue/[email protected] has still outdated babel dependencies. |
I changed the babel config, set useESModules false, solved my problem. |
The code below emitted a error, because transpiled code with babel had no matching condition
babel version: 7.0.0-beta.47
the output code was
I tried babel 7.1.2, also got error
The text was updated successfully, but these errors were encountered: