Webpack integration

Hi all,

I'm planning to use webpack on my project but I can't figure out how to handle webix the right way.

Basically, I just have to set webix as a plugin in the webpack configuration but as I looked into webix sources (webix.js) it isn't possible.

Is there a way to do it ?

Tagged:

Comments

  • edited July 10

    webpack.config.js

            resolve: {
                plugins: [
                     ...
                ],
                extensions: [...],
                alias: {
                    /*if (jet is used) {*/
                    "jet-views": path.join(scriptsPath, "views"),
                    "jet-locales": path.join(scriptsPath, "locales"),
                    /*} */
                    webixMain: path.join(webixPath, isProduction ? "webix" : "webix_debug"),
                    webix: webixPath
                }
            },
    
    

    input file

    import "webixMain";
    import "webix/skins/flat.css";
    
  • Thank you @intregal I also found another solution which is to pass webix as an entry like:

    module.exports = {
        entry: {
            vendor: [
                "./node_modules/backend_assets/js/webix_backbone.js",
                "./node_modules/backend_assets/js/webix.js"
            ],
            app: ["./client/app.js"]
        },
    // ...
    
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion