Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile parsley.js with webpack and babel issue #1261

Open
geosigno opened this issue Aug 9, 2018 · 4 comments
Open

Compile parsley.js with webpack and babel issue #1261

geosigno opened this issue Aug 9, 2018 · 4 comments

Comments

@geosigno
Copy link

geosigno commented Aug 9, 2018

As there is some code into parlsey as such:

' + this.name + '

This lead to a syntax issue in IE11.

So i want to use Babel as I did for other modules I import, but when it come to parsley I get this issue:

ReferenceError: [BABEL] **/node_modules/parsleyjs/dist/parsley.js: Using removed Babel 5 option: **/node_modules/parsleyjs/.babelrc.blacklist - Put the specific transforms you want in the `plugins` option

And I can't translate parlsey code to Babel.

This is my webpack config:

module.exports = {
    entry: './app/js/app.js',
    mode: 'none',
    output: {
        filename: 'app.js',
        path: path.resolve(__dirname, 'public/scripts/')
    },
    module: {
        rules: [
            {
                test: /\.js$/,
                loader: 'babel-loader',
                query: {
                    presets: [['env', { modules: false }]]
                }
            }
        ]
    },
};

and my babelrc:

{
    "presets": [ "env" ]
}

Ay though on this?

@marcandre
Copy link
Collaborator

Not too sure. It's possible we're using an old version of babel (and setup). Can you come up with PR to update babel and change the babelrc.blacklist correctly?

@marcandre
Copy link
Collaborator

(check #1170 too)

@geosigno
Copy link
Author

#1264

@therealshark
Copy link

@geosenna try to add babelrc: falseto the babel-loader options. This should fix the behaviour. The problem is, that the .babelrc from parsley gets read from the loader. By setting the option mentioned, that doesn't happen anymore :)

marcandre added a commit that referenced this issue Oct 5, 2018
Note: removed coverage task, which was broken anyways
marcandre added a commit that referenced this issue Mar 25, 2019
Note: removed coverage task, which was broken anyways
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants