Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    How does this things work?

    General Discussion
    2
    2
    181
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      hedyd last edited by

      I was going through admin panel and realized that in tinymce we have included scripts like 5131c50d-6771-4bd6-a0a3-8607522c6459-image.png

      and inside webpack.mix.js under package/Webkul/Admin we are building our css like

      const mix = require("laravel-mix");
      
      if (mix == 'undefined') {
          const { mix } = require("laravel-mix");
      }
      
      require("laravel-mix-merge-manifest");
      
      if (mix.inProduction()) {
          var publicPath = 'publishable/assets';
      } else {
          var publicPath = "../../../public/vendor/webkul/admin/assets";
      }
      
      mix.setPublicPath(publicPath).mergeManifest();
      mix.disableNotifications();
      
      mix.js(__dirname + "/src/Resources/assets/js/app.js", "js/admin.js")
          .sass(__dirname + "/src/Resources/assets/sass/app.scss", "css/admin.css")
          .sass(__dirname + "/src/Resources/assets/sass/tinymce.scss", "css/tinymce.css")
          .copy(__dirname + '/src/Resources/assets/images', publicPath + '/images')
          .options({
              processCssUrls: false
          });
      
      if (! mix.inProduction()) {
          mix.sourceMaps();
      }
      

      It is fine if the site is in dev mode, But how it will work on the production site as this css and js will build inside the Publishable folder instead of "../../../public/vendor/webkul/admin/assets"

      Nam in quod velit ni

      1 Reply Last reply Reply Quote 0
      • devansh-webkul
        devansh-webkul last edited by

        You need to publish the changes for that.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post