Skip to content

How to use with webpack? #1

@williamoliveira

Description

@williamoliveira

I am using vue cli's webpack template and I tried including bootstrap-vue on the babel loader like this:

//...
const projectRootPath = path.resolve(__dirname, '../')
const srcPath = path.join(projectRootPath, 'src')
const bootstrapVuePath = path.join(projectRootPath, 'node_modules/bootstrap-vue')
//...
{
     test: /\.js$/,
     loader: 'babel',
     include: [srcPath, bootstrapVueRoot]
},

but it does not works, the files aren't being transpilled, they get imported raw and the browser throws Uncaught SyntaxError: Unexpected token import

Am I missing something?

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