Skip to content

babel-loader doesn't transpile imported js from an outside directory #293

@felixexter

Description

@felixexter

Webpack Version: 1.13.2
Babel Core Version: 6.14.0
Babel Loader Version: 6.2.5
Environment: Windows 7

I'm trying to import a script from an outside app directory

// app/scripts/app.js
import test from '../../../test'

// ../test/index.js
import muliply from './multiply'
export default (a, b) => muliply(a, b)

It should be transpiled to es5, but i get an error in browser console:

Uncaught SyntaxError: Unexpected token import

Is it a bug or a feature and I need to config something else?

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