Skip to content

Code get not modified by babel #8

@otbe

Description

@otbe

Hi,

I use your plugin for my typescript based SPA, but the compiled output (dev and prod builds) still contains es2017 code (e.g. class or async/await).

If I add

  const { rule } = helpers.getLoadersByName(config, 'babel-loader')[0];
  rule.test = /\.(js|jsx|ts|tsx)$/;

to my preact.config.js it starts working. I love the idea to use typescript only for typechecking and typestripping and babel for all kinds of transformations. Especially since @babel/preset-typescript (waiting for babel7 in preact-cli :)).

Is there anything Im missing?

Best regards,
otbe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions