diff --git a/examples/action-chatgpt/action/ActionApp.tsx b/examples/action-chatgpt/action/ActionApp.tsx index aa2eb567..07f355bd 100644 --- a/examples/action-chatgpt/action/ActionApp.tsx +++ b/examples/action-chatgpt/action/ActionApp.tsx @@ -20,7 +20,7 @@ function ActionApp() { 'Hello there! This is your ChatGPT extension sample, ' + 'built with React, Tailwind.css, and DaisyUI. ' + 'For it to work, create a .env file with your EXTENSION_OPENAI_API_KEY. ' + - "You can get an API key from OpenAI's website.", + "You can get an API key from OpenAI's website????", role: 'assistant' }, { diff --git a/programs/develop/webpack/plugin-css/index.ts b/programs/develop/webpack/plugin-css/index.ts index 634f8af4..59e10ff4 100644 --- a/programs/develop/webpack/plugin-css/index.ts +++ b/programs/develop/webpack/plugin-css/index.ts @@ -12,7 +12,6 @@ import {type DevOptions} from '../../commands/dev' import {maybeUseSass} from './css-tools/sass' import {maybeUseLess} from './css-tools/less' import {maybeUseStylelint} from './css-tools/stylelint' -import {getAssetFilename} from '../webpack-config' export class CssPlugin { public static readonly name: string = 'plugin-css' @@ -29,13 +28,7 @@ export class CssPlugin { const projectPath = path.dirname(this.manifestPath) const plugins: WebpackPluginInstance[] = [ - new MiniCssExtractPlugin({ - chunkFilename: (pathData: PathData) => { - const runtime = (pathData.chunk as any)?.runtime - - return getAssetFilename(runtime) - } - }) + new MiniCssExtractPlugin() ] plugins.forEach((plugin) => plugin.apply(compiler)) diff --git a/programs/develop/webpack/plugin-static-assets/index.ts b/programs/develop/webpack/plugin-static-assets/index.ts index cde9d77b..4000a0f3 100644 --- a/programs/develop/webpack/plugin-static-assets/index.ts +++ b/programs/develop/webpack/plugin-static-assets/index.ts @@ -14,17 +14,11 @@ export class StaticAssetsPlugin { } public async apply(compiler: Compiler) { - const getAssetFilename = (folderPath: string) => { - return `${folderPath}/[name][ext]` - } // Define the default SVG rule const defaultSvgRule: RuleSetRule = { test: /\.svg$/i, type: 'asset/resource', - generator: { - filename: () => getAssetFilename('assets') - }, parser: { dataUrlCondition: { // inline images < 2 KB @@ -49,9 +43,6 @@ export class StaticAssetsPlugin { { test: /\.(png|jpg|jpeg|gif|webp|avif|ico|bmp)$/i, type: 'asset/resource', - generator: { - filename: () => getAssetFilename('assets') - }, parser: { dataUrlCondition: { // inline images < 2 KB @@ -61,17 +52,11 @@ export class StaticAssetsPlugin { }, { test: /\.(woff|woff2|eot|ttf|otf)$/i, - type: 'asset/resource', - generator: { - filename: () => getAssetFilename('assets') - } + type: 'asset/resource' }, { test: /\.(txt|md|csv|tsv|xml|pdf|docx|doc|xls|xlsx|ppt|pptx|zip|gz|gzip|tgz)$/i, type: 'asset/resource', - generator: { - filename: () => getAssetFilename('assets') - }, parser: { dataUrlCondition: { // inline images < 2 KB @@ -81,10 +66,7 @@ export class StaticAssetsPlugin { }, { test: /\.(csv|tsv)$/i, - use: [require.resolve('csv-loader')], - generator: { - filename: () => getAssetFilename('assets') - } + use: [require.resolve('csv-loader')] } ] diff --git a/programs/develop/webpack/webpack-config.ts b/programs/develop/webpack/webpack-config.ts index eb84b4c7..aba3283f 100644 --- a/programs/develop/webpack/webpack-config.ts +++ b/programs/develop/webpack/webpack-config.ts @@ -20,10 +20,6 @@ import {CompatibilityPlugin} from './plugin-compatibility' import {ErrorsPlugin} from './plugin-errors' import {BrowsersPlugin} from '../plugin-browsers' -export const getAssetFilename = (folderPath: string) => { - return `${folderPath}/[name][ext]` -} - export default function webpackConfig( projectPath: string, devOptions: DevOptions @@ -62,16 +58,6 @@ export default function webpackConfig( bigIntLiteral: true, dynamicImport: true }, - chunkFilename: (pathData) => { - const runtime = (pathData.chunk as any)?.runtime - - // Chunks are stored within their caller's directory, - // So a dynamic import of a CSS action page will be stored - // as action/[filename].css. - // The JS counterpart of this is defined in MiniCssExtractPlugin - // options.chunkFilename function. - return getAssetFilename(runtime) - } }, resolve: { modules: ['node_modules', path.join(projectPath, 'node_modules')],