diff --git a/typescript/package.json b/typescript/package.json index f44a296..9418521 100644 --- a/typescript/package.json +++ b/typescript/package.json @@ -22,29 +22,31 @@ "browser-sync": "^2.18.12", "copy-webpack-plugin": "^12.0.2", "css-loader": "^6.7.2", + "glob": "^11.0.3", "gulp": "*", "gulp-protractor": "*", "gulp-typescript": "*", "html-webpack-plugin": "^5.5.0", "jasmine": "^2.6.0", "mini-css-extract-plugin": "^2.7.0", + "style-loader": "^4.0.0", "ts-loader": "^9.4.1", "typescript": "*", "webpack": "^5.75.0", "webpack-cli": "^5.0.0", - "webpack-dev-server": "^4.11.1", + "webpack-dev-server": "^5.2.1", "webpack-stream": "^7.0.0" }, "dependencies": { + "@ai-sdk/azure": "^0.0.38", + "@ai-sdk/google": "^0.0.48", "@azure/openai": "^2.0.0-beta.1", "@google/generative-ai": "^0.13.0", "@syncfusion/ej2": "*", "@xenova/transformers": "^2.17.2", + "ai": "^3.3.40", "form-data": "^4.0.0", "groq-sdk": "^0.5.0", - "openai": "^4.52.1", - "@ai-sdk/azure": "^0.0.38", - "@ai-sdk/google": "^0.0.48", - "ai": "^3.3.40" + "openai": "^4.52.1" } } diff --git a/typescript/webpack.config.js b/typescript/webpack.config.js index bdc209f..7b38731 100644 --- a/typescript/webpack.config.js +++ b/typescript/webpack.config.js @@ -4,11 +4,14 @@ const path = require('path'); const glob = require('glob'); const CopyPlugin = require("copy-webpack-plugin"); const cssPatterns = glob.sync('./src/app/**/**/*.css'); -const cssFiles =[]; - cssPatterns.map(file => { - cssFiles.push({ from: file, to: file.replace('./src/app/','') }); - - }); +const cssFiles = []; +cssPatterns.map(file => { + // Normalize path separators for webpack 5 compatibility and add ./ prefix + const normalizedFile = './' + file.replace(/\\/g, '/'); + // Properly remove ./src/app/ prefix from destination path + const normalizedTo = normalizedFile.replace('./src/app/', ''); + cssFiles.push({ from: normalizedFile, to: normalizedTo }); +}); console.log('css patterns:' + JSON.stringify(cssFiles)); // Function to generate entry points @@ -68,6 +71,7 @@ module.exports = { }, resolve: { extensions: ['.ts', '.js'], + preferRelative: true, }, output: { filename: '[name].js', @@ -87,7 +91,13 @@ module.exports = { }), ], devServer: { - static: path.join(__dirname, 'dist'), + static: [ + path.join(__dirname, 'dist'), + { + directory: path.join(__dirname, 'src/app'), + publicPath: '/' + } + ], compress: true, port: 5001, open: true,