License check broken since needle engine 3.1

The engine doesn’t export the license js file, with 2.67, everything works as expected

Original Post on Discord

by user 334342083445784576

Hi, yes that changed in 3.x and is now done via a vite plugin. Do you have the needle vite plugins installed in your vite.config ?

Hmm, I did everything you wrote in the release notes (removing the alias in the file). This is my config, but still no license file

import * as path from 'path';
import { defineConfig } from 'vite';
import viteCompression from 'vite-plugin-compression';
import basicSsl from '@vitejs/plugin-basic-ssl'

export default defineConfig(async ({ command }) => {

    const { needlePlugins, useGzip, loadConfig } = await import("@needle-tools/engine/plugins/vite/index.js");
    const needleConfig = await loadConfig();

    return {
        base: "./",
        assetsInclude: ['*'],
        plugins: [
            basicSsl(),
            useGzip(needleConfig) ? viteCompression({ deleteOriginFile: true }) : null,
            needlePlugins(command, needleConfig),
        ],

        server: {
            // hmr: false,
            // watch: ["generated/**"]
            https: true,
            proxy: { // workaround: specifying a proxy skips HTTP2 which is currently problematic in Vite since it causes session memory timeouts.
                'https://localhost:3000': 'https://localhost:3000'
            },
            watch: {
                awaitWriteFinish: {
                    stabilityThreshold: 500,
                    pollInterval: 1000
                }
            },
            strictPort: true,
            port: 3000,
        },
        build: {
            outDir: "./dist",
            emptyOutDir: true,
            keepNames: true,
        }
    }
});

by user 334342083445784576

There will be no license file anymore

It will be baked in the package directly by the vite plugin

You may need to restart the server perhaps?

I restarted the editor/computer and exported the project on a webserver :slightly_smiling_face:

by user 334342083445784576

And Unity says the license is valid?

yes
image.png
image.png

by user 334342083445784576

I’ll generate a new project now and check if this works

by user 334342083445784576

Still no valid license. Very strange

by user 334342083445784576

Ok ill try to repdo here

sorry about that

First I need a license :joy:

Which vite version are you using? Its working here, do you think you can send me the new project you tried using the bugreporter?

Hey @Podden any news on that?

on it, deadline incoming :wink:

by user 334342083445784576

(it’s fixed btw for anyone coming across this)