No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. LaZe
    L
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 1
    • Best 1
    • Groups 0

    LaZe

    @LaZe

    1
    Reputation
    8
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    LaZe Follow

    Best posts made by LaZe

    • RE: multiple entry points?

      I must admit, it’s quite tricky to set up a second entry point. In my case I needed to load the app with different headers through different index.html depending on the domain.

      The only solution I found was to tell webpack directly, in my quasar.conf I have something like :

      const env = require('quasar-dotenv').config();
      const HtmlWebpackPlugin = require('html-webpack-plugin');
      
      module.exports = function (ctx) {
         return {
            ...
            build: {
               ...
               extendWebpack(cfg) {
                  ...
                  cfg.plugins.push(
                     new HtmlWebpackPlugin({
                        template: `${__dirname}\\src\\index2.template.html`,
                        filename: 'index2.html',
                        chunks: 'all',
                        ctx: ctx,
                        process: { env: env },
                        productName: "PageTitle",
                        productDescription: "PageDescription"
                     })
                  );
               }
            }
         }
      }
      

      /!\ The second index will be generated referencing the same assets and bundle.js

      posted in CLI
      L
      LaZe

    Latest posts made by LaZe

    • RE: multiple entry points?

      I must admit, it’s quite tricky to set up a second entry point. In my case I needed to load the app with different headers through different index.html depending on the domain.

      The only solution I found was to tell webpack directly, in my quasar.conf I have something like :

      const env = require('quasar-dotenv').config();
      const HtmlWebpackPlugin = require('html-webpack-plugin');
      
      module.exports = function (ctx) {
         return {
            ...
            build: {
               ...
               extendWebpack(cfg) {
                  ...
                  cfg.plugins.push(
                     new HtmlWebpackPlugin({
                        template: `${__dirname}\\src\\index2.template.html`,
                        filename: 'index2.html',
                        chunks: 'all',
                        ctx: ctx,
                        process: { env: env },
                        productName: "PageTitle",
                        productDescription: "PageDescription"
                     })
                  );
               }
            }
         }
      }
      

      /!\ The second index will be generated referencing the same assets and bundle.js

      posted in CLI
      L
      LaZe