try bundle with vue: 'import' and 'export' may only appear at the top level
See original GitHub issueChoose one: is this a π bug report or π feature request? a π bug report
π Configuration (.babelrc, package.json, cli command)
.babelrc
{
"presets": [
["es2015"]
]
}
π€ Expected Behavior
Build pass
π― Current Behavior
Not passed
π Possible Solution
Maybe because of babel?
π¦ Context
Iβm using parcel + vue-compiler with vue single file temeplate
π» Code Sample
π Your Environment
Software | Version(s) |
---|---|
Parcel | 1.51 |
Node | 9.6.0 |
npm/Yarn | 5.3.0 |
Operating System | windows10 |
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
'import' and 'export' may only appear at the top level
'import' and 'export' may only appear at the top level. This means that webpack is bundling the non-transpiled ES6 code, which is why...
Read more >'import' and 'export' may only appear at the top level Β· Issue #304
Bundling worked with lodash-es without any issues till v. 11.0.2 . Actual Behavior !] Error: 'import' and 'export' may only appear at the...
Read more >import' and 'export' may only appear at the top level-Vue.js
I am using Webpack 2.2.0 to bundle my React JS modules. Encountered a similar issue while importing modules in my main app.js file....
Read more >'import' and 'export' may only appear at the top level - SyntaxFix
I'm using webpack with vuejs. Webpack does its thing, but when I look at the outputted app.js file, it gives me this error....
Read more >How to fix: import and export may only appear at the top level
Solution: Downgrade @rollup/plugin-commonjs to 11.0.2. I've had to downgrade the module library version. Just run this command in your terminal: npm i -D...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Solved. Successfully built.
@wtfuii