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

✨ Multiwindow support #17

Merged
merged 14 commits into from
Dec 10, 2023
Merged
20 changes: 9 additions & 11 deletions .config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import MiniCssExtractPlugin from 'mini-css-extract-plugin'
import { join, resolve } from 'node:path'
import preprocess from 'svelte-preprocess'
import sequence from 'svelte-sequential-preprocessor'
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'
import WebpackLicensePlugin from 'webpack-license-plugin'

const HTML_TEMPLATE_FILE = './src/content/index.html'
Expand Down Expand Up @@ -86,16 +87,12 @@ const sharedSettings = (contentFiles, dev) => {
overlay: false,
},
},
optimization: dev
? {
runtimeChunk: 'single',
}
: {
runtimeChunk: 'single',
splitChunks: {
chunks: 'all',
},
},
optimization: {
runtimeChunk: 'single',
splitChunks: {
chunks: 'all',
},
},

module: {
rules: [
Expand Down Expand Up @@ -174,7 +171,8 @@ const sharedSettings = (contentFiles, dev) => {
},
],
}),
],
// dev && new BundleAnalyzerPlugin(),
].filter(Boolean),

experiments: {
topLevelAwait: true,
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"@melt-ui/pp": "^0.1.4",
"@melt-ui/svelte": "^0.64.0",
"@tinyhttp/app": "^2.2.1",
"@total-typescript/ts-reset": "^0.5.1",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@tsconfig/svelte": "^5.0.2",
"@types/node": "^20.8.4",
Expand Down Expand Up @@ -60,6 +61,7 @@
"ts-loader": "^9.5.0",
"typescript": "^5.2.2",
"webpack": "^5.89.0",
"webpack-bundle-analyzer": "^4.10.1",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"webpack-license-plugin": "^4.4.2",
Expand Down Expand Up @@ -90,6 +92,7 @@
"importOrder": [
"^resource://(.*)$",
"^@shared/(.*)$",
"^@browser/(.*)$",
"^[./]"
],
"importOrderSeparation": true,
Expand Down
129 changes: 119 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion scripts/lib/artifacts.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/* eslint-disable no-console */
import { existsSync } from 'fs'
import { readFile, rm } from 'fs/promises'

Expand Down Expand Up @@ -59,7 +61,7 @@ export async function downloadArtifact(artifact: Artifact): Promise<string> {
await rm(artifactFile)
}

// Write out a new line so that progress doesn't overwrite exising logs
// Write out a new line so that progress doesn't overwrite existing logs
console.info(artifact.archive_download_url)

// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down
3 changes: 3 additions & 0 deletions scripts/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ export const getDistFile = getXFile(DIST_PATH)
export const SRC_PATH = resolve(process.cwd(), 'src')
export const getSrcFile = getXFile(SRC_PATH)

export const STATIC_PATH = resolve(process.cwd(), 'static')
export const getStaticFile = getXFile(STATIC_PATH)

export const SCRIPTS_PATH = resolve(process.cwd(), 'scripts')
Loading
Loading