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

"You may need an appropriate loader to handle this file type" #21

Open
jerrygreen opened this issue Feb 28, 2021 · 0 comments
Open

"You may need an appropriate loader to handle this file type" #21

jerrygreen opened this issue Feb 28, 2021 · 0 comments

Comments

@jerrygreen
Copy link

I extend my webpack config like this:

    config.module.rules.push({
      test: /\.ts?$/,
      loader: 'assemblyscript-typescript-loader',
      include: /assemblyscript/, //to avoid a conflict with other ts file who use 'ts-load',so you can division them with prop 'include'
      options: {
        limit: 1000,
        name: `static/assembly/[name].[hash:8].wasm`,
      },
    })

But I face this error:

Module parse failed: Unexpected token (1:21)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> export function add(a: i32, b: i32): i32 {
|   return a + b
| }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant