yavorsky / riot-brunch

Adds Riot.js support to brunch
14 stars 15 forks source link

Babel not transpiling tags #15

Open kazzkiq opened 7 years ago

kazzkiq commented 7 years ago

Hi, I'm having trouble with Babel and riot-brunch. It seems all my JavaScript code gets transpiled normally, while tags don't.

Here is my brunch-config.js:

module.exports = {
  npm: {
    globals: {
      riot: 'riot',
      route: 'riot-route'
    }
  },
  files: {
    javascripts: { joinTo: 'app.js' },
    stylesheets: { joinTo: 'app.css' }
  },
  plugins: {
    on: ['riot'],
    riot: {
      pattern: /\.tag$/
    },
    babel: {
      presets: ['es2015'],
      plugins: ['transform-async-to-generator']
    }
  },
  modules: {
    autoRequire: { 'app.js': ['initialize'] }
  }
};

Did I made something wrong?

kazzkiq commented 7 years ago

It seems I forgot to add type: 'es6' to the brunch-config.js file.

But after I add this option, the project throws this error in terminal:

error: Compiling of app/components/Sample.component.tag failed.
Error: ReferenceError: [BABEL] unknown: Using removed Babel 5 option: base.blacklist
- Put the specific transforms you want in the `plugins` option
yavorsky commented 7 years ago

@kazzkiq thanks, fixing..

r0x0r commented 6 years ago

This issue still persists. Adding type: 'es6' does not help.