Skip to content

Commit

Permalink
better dev setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Zyie committed Feb 13, 2024
1 parent 4f1ade5 commit b9801a3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/chrome/manifest.dev.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "DEV: PixiJS DevTools",
"action": {
"default_icon": {
"16": "icon-inactive-16.png",
Expand Down
6 changes: 5 additions & 1 deletion src/chrome/src/devtools/devtools.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
chrome.devtools.panels.create('PixiJS DevTools', 'panel-icon.png', 'src/devtools/panel/panel.html');
chrome.devtools.panels.create(
import.meta.env.DEV ? 'Dev: PixiJS DevTools' : 'PixiJS DevTools',
'panel-icon.png',
'src/devtools/panel/panel.html',
);
4 changes: 2 additions & 2 deletions vite.chrome.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import devManifest from './src/chrome/manifest.dev.json';
import manifest from './src/chrome/manifest.json';

export default defineConfig((config) => {
const publicDir = resolve(__dirname, 'src/chrome/assets');
const outDir = resolve(__dirname, 'dist/chrome');
const isDev = config.mode === 'development';
const publicDir = resolve(__dirname, 'src/chrome/assets');
const outDir = resolve(__dirname, isDev ? 'dist/chrome-dev' : 'dist/chrome');
const extensionManifest = {
...manifest,
...(isDev ? devManifest : ({} as ManifestV3Export)),
Expand Down

0 comments on commit b9801a3

Please sign in to comment.