persvr / rql

Resource Query Language
http://www.persvr.org/
268 stars 49 forks source link

Webpack compalibility #69

Open jurijstur opened 8 years ago

jurijstur commented 8 years ago

Experiencing this error when using with webpack:

Uncaught Error: define cannot be used indirect

arekstryjski commented 7 years ago

I have the same problem. Is this already fixed?

I also noticed there was not commit to the project in last 2 years, and the latest npm package version 0.3.3 was made on 2014-10-14. Is this project still alive?

amcdnl commented 7 years ago

Also experiencing this issue.

stheves commented 3 years ago

We also faced the same issue but this webpack config worked for us:

module: {
  rules: [
...,
  {
        test: /node_modules\/rql/,
        use: [
            {
                loader: 'imports-loader',
                options: {
                    additionalCode: 'var define=undefined;',
                },
            },
...
        ],
    }
]
}

You need also to include the "imports-loader" webpack loader in your package.json.