Skip to content

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

Open
@jerrygreen

Description

@jerrygreen

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
| }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions