Vue-cli: Cannot run anything if extension is .mjs or .wasm

Created on 27 Sep 2018  路  5Comments  路  Source: vuejs/vue-cli

Version
3.0.4

Reproduction link
https://github.com/jaydenseric/apollo-upload-client/issues/117#issuecomment-424968017

Node and OS info
node 8.11.4 / npm 6.4.1 / OS X

Steps to reproduce
Have a simple vue cli 3 project.

npm i -S extract-files And use this module anywhere in your application or config.

npm run serve

What is expected?
It starts.

What is actually happening?

error in ./node_modules/extract-files/lib/index.mjs

Can't reexport the namespace object from non EcmaScript module (only default export is available)

VUE CLI resolvers supports only: ['.js', '.jsx', '.vue', '.json'] https://github.com/vuejs/vue-cli/blob/v3.0.4/packages/%40vue/cli-service/lib/config/base.js#L41

Whereas it should be: ['.wasm', '.mjs', '.js', '.jsx', '.vue', '.json'] https://github.com/zeit/next.js/blob/7.0.1-canary.0/build/webpack.js#L155

Most helpful comment

It's customizable anyway. Add these lines to vue.config.js:
```
// vue.config.js
module.exports = {
chainWebpack: config => config.resolve.extensions.prepend('.mjs').prepend('.wasm')
}

All 5 comments

Hello, your issue has been closed because it does not conform to our issue requirements. In order to ensure every issue provides the necessary information for us to investigate, we require the use of the Issue Helper when creating new issues. Thank you!

You got to be kidding me!

It's customizable anyway. Add these lines to vue.config.js:
```
// vue.config.js
module.exports = {
chainWebpack: config => config.resolve.extensions.prepend('.mjs').prepend('.wasm')
}

@koresar Did you used the issue builder ? https://new-issue.vuejs.org/?repo=vuejs/vue-cli

I'll use @sodatea patch awaiting for this thanks

I did! Then I edited to fix a typo - and it closed the issue.

I find this system quite annoying and unproductive.

Can it be only one ticketing system instead of the two?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sanderswang picture sanderswang  路  3Comments

eladcandroid picture eladcandroid  路  3Comments

chasegiunta picture chasegiunta  路  3Comments

joshuajohnson814 picture joshuajohnson814  路  3Comments

DrSensor picture DrSensor  路  3Comments