Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamlining production of tailwindcss bundled css, introducing multiple entryfiles for content-ui foldesr #750

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ chrome-extension/public/manifest.json
**/tailwind-output.css

# vite timestamp (because of bug from lib, remove it after fix will have been realased)
**/vite.config.mts.timestamp-*
**/vite.config.mts.timestamp-*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can't be ignored

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops i forgot ive done that, will remove it.. i just have to push another commit right?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's your normal workflow, PR it's only for tracking it

pnpm-lock.yaml
2 changes: 1 addition & 1 deletion chrome-extension/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const manifest = deepmerge(
},
{
matches: ['http://*/*', 'https://*/*', '<all_urls>'],
js: ['content-ui/index.iife.js'],
js: ['content-ui/page1/index_dev.js'],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of missing implementation about shadow dom injection, this is totally not working right now

Copy link
Author

@tngflx tngflx Sep 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

erm bro.. basically what you need to do is just this :

import { createRoot } from 'react-dom/client';
import '@src/index.css';
import '../dist/global-out.css';
import NewTab from '@src/NewTab';

ive included in every page that needed this css bundle.. it worked outright for me without pasting
@tailwind base @tailwind components all over the place

you couldn't see it, because of the fail build? did you try local version?

},
{
matches: ['http://*/*', 'https://*/*', '<all_urls>'],
Expand Down
12 changes: 6 additions & 6 deletions chrome-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@
"type-check": "tsc --noEmit"
},
"dependencies": {
"webextension-polyfill": "^0.12.0",
"@extension/shared": "workspace:*",
"@extension/storage": "workspace:*"
"@extension/storage": "workspace:*",
"webextension-polyfill": "^0.12.0"
},
"devDependencies": {
"@extension/dev-utils": "workspace:*",
"@extension/hmr": "workspace:*",
"@extension/tsconfig": "workspace:*",
"@extension/vite-config": "workspace:*",
"@laynezh/vite-plugin-lib-assets": "^0.5.23",
"@laynezh/vite-plugin-lib-assets": "^0.5.24",
"@types/ws": "^8.5.12",
"magic-string": "^0.30.10",
"ts-loader": "^9.5.1",
"cross-env": "^7.0.3",
"deepmerge": "^4.3.1",
"cross-env": "^7.0.3"
"magic-string": "^0.30.11",
"ts-loader": "^9.5.1"
}
}
21 changes: 12 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@
"devDependencies": {
"@types/chrome": "^0.0.270",
"@types/node": "^20.16.5",
"@types/react": "^18.3.3",
"@types/postcss-import": "^14.0.3",
"@types/react": "^18.3.7",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"autoprefixer": "^10.4.20",
"cross-env": "^7.0.3",
"esbuild": "^0.23.0",
"esbuild": "^0.23.1",
"eslint": "8.57.0",
"eslint-config-airbnb-typescript": "18.0.0",
"eslint-config-prettier": "9.1.0",
Expand All @@ -53,17 +54,19 @@
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-react": "7.35.0",
"eslint-plugin-react-hooks": "4.6.2",
"husky": "^9.1.4",
"lint-staged": "^15.2.7",
"husky": "^9.1.6",
"lightningcss": "^1.27.0",
"lint-staged": "^15.2.10",
"postcss": "^8.4.47",
"postcss-import": "^16.1.0",
"prettier": "^3.3.3",
"rimraf": "^6.0.1",
"tailwindcss": "^3.4.11",
"tslib": "^2.6.3",
"turbo": "^2.0.12",
"run-script-os": "^1.1.6",
"tailwindcss": "^3.4.12",
"tslib": "^2.7.0",
"turbo": "^2.1.2",
"typescript": "5.5.4",
"vite": "5.4.3",
"run-script-os": "^1.1.6"
"vite": "5.4.3"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,json}": [
Expand Down
1 change: 1 addition & 0 deletions packages/hmr/lib/plugins/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './watch-rebuild-plugin';
export * from './make-entry-point-plugin';
export * from './watch-public-plugin';
export * from './tailwindcss-bundler';
42 changes: 42 additions & 0 deletions packages/hmr/lib/plugins/tailwindcss-bundler.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { Plugin } from 'vite';
import fs from 'fs/promises';
import path from 'path';
Comment on lines +2 to +3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import fs from 'fs/promises';
import path from 'path';
import fs from 'node:fs/promises';
import path from 'node:path';

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh node must be included? what happen if don't

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import postcss from 'postcss';
import tailwindcss from 'tailwindcss';
import autoprefixer from 'autoprefixer';
import postcssImport from 'postcss-import';
import LightningCSS from 'lightningcss';

const rootDir = path.resolve(__dirname, '../../../../');

export function processCssPlugin(): Plugin {
return {
name: 'process-css',
async configResolved(config) {
const inputFile = path.resolve(rootDir, 'ui/lib/global.css');
const outputFile = path.resolve(config.root, 'dist/global-out.css');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's really necessary to change name to -out?


const css = await fs.readFile(inputFile, 'utf-8');
const result = await postcss([postcssImport(), tailwindcss, autoprefixer]).process(css, {
from: inputFile,
to: outputFile,
});

const minified = LightningCSS.transform({
code: Buffer.from(result.css, 'utf8'),
minify: true,
targets: {
// Define your target browsers or leave empty for default
},
filename: 'global.css',
});

const finalCss = Buffer.from(minified.code).toString('utf8');

await fs.mkdir(path.dirname(outputFile), { recursive: true });
await fs.writeFile(outputFile, finalCss);

console.log('CSS processed and saved to', outputFile);
},
};
}
2 changes: 1 addition & 1 deletion packages/hmr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@types/ws": "^8.5.12",
"esm": "^3.2.25",
"fast-glob": "^3.3.2",
"rollup": "^4.20.0",
"rollup": "^4.21.3",
"ts-node": "^10.9.2",
"ws": "8.18.0"
}
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions packages/i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"clean:node_modules": "pnpx rimraf node_modules",
"clean:turbo": "rimraf .turbo",
"clean": "pnpm clean:bundle && pnpm clean:node_modules && pnpm clean:turbo",
"genenrate-i8n": "node genenrate-i18n.mjs",
"ready": "pnpm genenrate-i8n && node build.dev.mjs",
"build": "pnpm genenrate-i8n && node build.prod.mjs",
"generate-i8n": "node generate-i18n.mjs",
"ready": "pnpm generate-i8n && node build.dev.mjs",
"build": "pnpm generate-i8n && node build.prod.mjs",
Comment on lines +17 to +19
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

"lint": "eslint . --ext .ts,.tsx",
"lint:fix": "pnpm lint --fix",
"prettier": "prettier . --write --ignore-path ../../.prettierignore",
Expand Down
4 changes: 1 addition & 3 deletions packages/ui/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,4 @@ await replaceTscAliasPaths({
watch: false,
outDir: 'dist',
declarationDir: 'dist',
});

fs.copyFileSync(resolve('lib', 'global.css'), resolve('dist', 'global.css'));
});
2 changes: 1 addition & 1 deletion packages/ui/lib/global.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@tailwind utilities;
4 changes: 2 additions & 2 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "module",
"files": [
"dist/**",
"dist/global.css"
"dist/global-out.css"
],
"types": "index.ts",
"main": "./dist/index.js",
Expand All @@ -29,6 +29,6 @@
},
"dependencies": {
"clsx": "^2.1.1",
"tailwind-merge": "^2.4.0"
"tailwind-merge": "^2.5.2"
}
}
2 changes: 1 addition & 1 deletion packages/vite-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"@extension/hmr": "workspace:*",
"@extension/tsconfig": "workspace:*",
"@vitejs/plugin-react-swc": "^3.6.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"deepmerge": "^4.3.1"
}
}
2 changes: 1 addition & 1 deletion packages/zipper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
"@extension/tsconfig": "workspace:*",
"fast-glob": "^3.3.2",
"fflate": "^0.8.2",
"tsx": "^4.16.2"
"tsx": "^4.19.1"
}
}
7 changes: 3 additions & 4 deletions pages/content-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
"clean:node_modules": "pnpx rimraf node_modules",
"clean:turbo": "rimraf .turbo",
"clean": "pnpm clean:bundle && pnpm clean:node_modules && pnpm clean:turbo",
"build:tailwindcss": "pnpm tailwindcss -i ./src/tailwind-input.css -o ./dist/tailwind-output.css -m",
"build": "pnpm build:tailwindcss && vite build",
"build:watch": "concurrently \"cross-env __DEV__=true vite build --mode development\" \"pnpm build:tailwindcss -- -w\"",
"dev": "pnpm build:tailwindcss && pnpm build:watch",
"build": "vite build",
"build:watch": "cross-env __DEV__=true vite build --mode development",
"dev": "pnpm build:watch",
"lint": "eslint . --ext .ts,.tsx",
"lint:fix": "pnpm lint --fix",
"prettier": "prettier . --write --ignore-path ../../.prettierignore",
Expand Down
52 changes: 52 additions & 0 deletions pages/content-ui/script/entryPoints.ts
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't work that way, it need to edit manifest.ts before build.
If user have 3 scripts for different matches, then those scripts need to be taken with matches(from e.g special const like, Metadata for NextJS or sth like that

This should reading all folders from e.g. matches folder which are placed inside src and this special const from inside e.g. simpy MATCHES

Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { readdirSync, existsSync, mkdirSync, writeFileSync, Dirent, readFileSync, renameSync } from 'fs';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { readdirSync, existsSync, mkdirSync, writeFileSync, Dirent, readFileSync, renameSync } from 'fs';
import { readdirSync, existsSync, mkdirSync, writeFileSync, Dirent, readFileSync, renameSync } from 'node:fs';

import { resolve } from 'node:path';

Check failure on line 2 in pages/content-ui/script/entryPoints.ts

View workflow job for this annotation

GitHub Actions / eslint

'renameSync' is defined but never used

const rootDir = resolve(__dirname, '..');
const srcDir = resolve(rootDir, 'src');

export const getEntryPoints = (options: { include?: string[]; exclude?: string[]; createRecursively?: boolean }) => {
const entryPoints: Record<string, string> = {};

const foldersToProcess =
options.include ||
readdirSync(srcDir, { withFileTypes: true })
.filter((item): item is Dirent => item.isDirectory())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not like that?

Suggested change
.filter((item): item is Dirent => item.isDirectory())
.filter((item: : Dirent) => item.isDirectory())

I don't really know this kind of typing, that's interesting

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unnecessary assertion.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unnecessary assertion.

erm we only want folder name, and not file names, readdirsync will read filenames too which we don't want.

.map(item => item.name);

foldersToProcess.forEach(folderName => {
const shouldExclude = options.exclude && options.exclude.includes(folderName);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe sth like that:

Suggested change
const shouldExclude = options.exclude && options.exclude.includes(folderName);
const shouldExclude = options.exclude?.includes(folderName);


if (!shouldExclude) {
const entryFolder = resolve(srcDir, folderName);
const entryFileTS = resolve(entryFolder, 'index.ts');
const entryFileTSX = resolve(entryFolder, `${folderName}.tsx`);
const existingEntryFileTSX = resolve(srcDir, 'App.tsx');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The details of creating an existing App.tsx as an entry point for pages is a very specific implementation that is difficult to understand from the outside.

App.tsx is not currently used anywhere, so it seems like a good idea to rename it to something like Template.tsx.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahhh i just added that, cause user can choose between just single page or multi page, if user chooses to have multipage, he can always just add stuff into getentrypoints.includes which will generate those template for them. so its easier for them to understand.


if (!existsSync(entryFolder) && options.createRecursively) {
mkdirSync(entryFolder, { recursive: true });
writeFileSync(entryFileTS, `export * from "./${folderName}";`);

// Copy the existing entry file to the new entry file, just as a template
if (existsSync(existingEntryFileTSX)) {
writeFileSync(entryFileTSX, readFileSync(existingEntryFileTSX, 'utf8'));

try {
// renameSync(existingEntryFileTSX, resolve(srcDir, 'App-deleteMe!.tsx'));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't leave comments like this for review

} catch (error) {
console.error('Failed to rename file:', error);
}
} else {
writeFileSync(entryFileTSX, '');
}
}

if (existsSync(entryFolder)) {
entryPoints[folderName] = entryFileTS;
} else {
console.warn(`Folder "${folderName}" does not exist and was not created.`);
}
}
});

return entryPoints;
};
6 changes: 3 additions & 3 deletions pages/content-ui/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createRoot } from 'react-dom/client';
import App from '@src/App';
import tailwindcssOutput from '../dist/tailwind-output.css?inline';
import globalCssOutput from '../dist/global-out.css?inline';

const root = document.createElement('div');
root.id = 'chrome-extension-boilerplate-react-vite-content-view-root';
Expand All @@ -20,12 +20,12 @@ if (navigator.userAgent.includes('Firefox')) {
* Injecting styles into the document, this may cause style conflicts with the host page
*/
const styleElement = document.createElement('style');
styleElement.innerHTML = tailwindcssOutput;
styleElement.innerHTML = globalCssOutput;
shadowRoot.appendChild(styleElement);
} else {
/** Inject styles into shadow dom */
const globalStyleSheet = new CSSStyleSheet();
globalStyleSheet.replaceSync(tailwindcssOutput);
globalStyleSheet.replaceSync(globalCssOutput);
shadowRoot.adoptedStyleSheets = [globalStyleSheet];
}

Expand Down
1 change: 1 addition & 0 deletions pages/content-ui/src/page1/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './page1';
23 changes: 23 additions & 0 deletions pages/content-ui/src/page1/page1.tsx
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be page1/App.tsx

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeap i agree. i just want to show example

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { useEffect } from 'react';
import { Button } from '@extension/ui';
import { useStorage } from '@extension/shared';
import { exampleThemeStorage } from '@extension/storage';

export default function App() {
const theme = useStorage(exampleThemeStorage);

useEffect(() => {
console.log('content ui loaded');
}, []);

return (
<div className="flex items-center justify-between gap-2 bg-blue-100 rounded py-1 px-2">
<div className="flex gap-1 text-blue-500">
Edit <strong className="text-blue-700">pages/content-ui/src/app.tsx</strong> and save to reload.
</div>
<Button theme={theme} onClick={exampleThemeStorage.toggle}>
Toggle Theme
</Button>
</div>
);
}
1 change: 1 addition & 0 deletions pages/content-ui/src/page2/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './page2';
23 changes: 23 additions & 0 deletions pages/content-ui/src/page2/page2.tsx
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

page2/App.tsx 👀

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { useEffect } from 'react';
import { Button } from '@extension/ui';
import { useStorage } from '@extension/shared';
import { exampleThemeStorage } from '@extension/storage';

export default function App() {
const theme = useStorage(exampleThemeStorage);

useEffect(() => {
console.log('content ui loaded');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be the same as in first script, but anyway.
1 example is enough

}, []);

return (
<div className="flex items-center justify-between gap-2 bg-blue-100 rounded py-1 px-2">
<div className="flex gap-1 text-blue-500">
Edit <strong className="text-blue-700">pages/content-ui/src/app.tsx</strong> and save to reload.
</div>
<Button theme={theme} onClick={exampleThemeStorage.toggle}>
Toggle Theme
</Button>
</div>
);
}
3 changes: 0 additions & 3 deletions pages/content-ui/src/tailwind-input.css

This file was deleted.

24 changes: 19 additions & 5 deletions pages/content-ui/vite.config.mts
Original file line number Diff line number Diff line change
@@ -1,24 +1,38 @@
import { resolve } from 'node:path';
import { makeEntryPointPlugin } from '@extension/hmr';
import { isDev, withPageConfig } from '@extension/vite-config';
import { processCssPlugin } from '@extension/hmr';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO some people might wonder why this plugin include hmr package... 🤔

It would be nice to refactor it to collect packages used in the development environment in the future.

Copy link
Author

@tngflx tngflx Sep 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

erm bro this is your own method ... haha you've written like this for your own plugin, so i just follow your convention :

import { makeEntryPointPlugin } from '@extension/hmr';
import { withPageConfig, isDev } from '@extension/vite-config';

const rootDir = resolve(__dirname);
const libDir = resolve(rootDir, 'lib');

export default withPageConfig({
  resolve: {
    alias: {
      '@lib': libDir,
    },
  },
  publicDir: resolve(rootDir, 'public'),
  plugins: [isDev && makeEntryPointPlugin()],

i follow your makeentrypointplugin

import { getEntryPoints } from './script/entryPoints';

const rootDir = resolve(__dirname);
const srcDir = resolve(rootDir, 'src');

/**
* Here is the place to add new entry points, u can straight away add new folders here to include
* without creating folders in src dir manually.
* @param {string[]} options.include - Folders to include !!MODIFY ME!!
* @param {string[]} options.exclude - Folders to exclude !!MODIFY ME!!
* @param {boolean} options.createRecursively - Create folders recursively
* @returns {Record<string, string>}
*/
const entryPoints = getEntryPoints({
include: ['page1', 'page2'], createRecursively: true
});
Comment on lines +9 to +19
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems more like makeEntryponits than getEntryPoints, and shouldn't it be possible to run it as a separate script? I'm curious why it's in the vite config together.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cause getentrypoints/makeentrypoints is resolving to the array of folder names to be used in vite.config entries. that's why its here. if not vite config don't know which folder to process. And yes this is more of convenience feature and people can add to manifest.json later


export default withPageConfig({
resolve: {
alias: {
'@src': srcDir,
},
},
plugins: [isDev && makeEntryPointPlugin()],
plugins: [processCssPlugin()],
publicDir: resolve(rootDir, 'public'),
build: {
lib: {
entry: resolve(srcDir, 'index.tsx'),
entry: entryPoints,
name: 'contentUI',
formats: ['iife'],
fileName: 'index',
formats: ['es'],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't have it to es because it isn't working good, i've checked it XD

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm my repo worked fine, but im really puzzled how the test all failed, i didn't even touched the content-runtime stuff

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to e.g. inject runtime script several times, you will have an error

fileName: (format, entryName) =>
isDev ? `${entryName}/index_dev.js` : `${entryName}/index.js`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you need to have 2 different files?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filename should be different in dev and production mode, perhaps hashes should be applied in production? that's the convention no?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, i don't think it's really necessary to add prefix
If there's some differences between dev and prod versions, let's add if statement or sth inside code, and you'll have other output file.

},
outDir: resolve(rootDir, '..', '..', 'dist', 'content-ui'),
},
Expand Down
Loading
Loading