Skip to content

Add support for loading WebAssembly and ES Modules - #2819

Merged
haoqunjiang merged 1 commit into
vuejs:devfrom
ScreamZ:patch-1
Nov 26, 2018
Merged

Add support for loading WebAssembly and ES Modules#2819
haoqunjiang merged 1 commit into
vuejs:devfrom
ScreamZ:patch-1

Conversation

@ScreamZ

@ScreamZ ScreamZ commented Oct 26, 2018

Copy link
Copy Markdown
Contributor

Hello,

It is pretty common to see .wasm and .mjs files nowadays, some library start using them and this break by default in vue-cli without extending like this.

This pull request add support for those kind of files out-of-the-box.

vue.config.js

module.exports = {
  chainWebpack: config => config.resolve.extensions.prepend('.mjs').prepend('.wasm')
}

Do not hesitate to ping me if you have any questions / need something.

Regards

@haoqunjiang

haoqunjiang commented Oct 27, 2018

Copy link
Copy Markdown
Member

As a side note: jest currently does not support these extensions (jestjs/jest#4842). We should document it somewhere.

See also react/create-react-app#5258 (comment)

@ScreamZ

ScreamZ commented Oct 27, 2018

Copy link
Copy Markdown
Contributor Author

@sodatea What do you think of here ?

@haoqunjiang

Copy link
Copy Markdown
Member

@ScreamZ Looks good to me.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants