chore: prohibit non-type imports of webextension-polyfill

This commit is contained in:
kyranjamie
2022-07-04 09:54:57 +02:00
committed by kyranjamie
parent eda875a6b6
commit 4939bb6aac
3 changed files with 13 additions and 15 deletions

View File

@@ -39,6 +39,12 @@ module.exports = {
from: { path: '^src', pathNot: ['^src/app/store/*'] },
to: { path: 'jotai*' },
},
{
name: 'ban-non-type-imports-from-webextension-polyfill',
severity: 'error',
from: { path: '^src' },
to: { path: 'webextension-polyfill', dependencyTypesNot: ['type-only'] },
},
{
name: 'component-cannot-import-pages-or-features',
severity: 'error',

View File

@@ -8,7 +8,7 @@ export function NoAccountActivity() {
<Stack py="extra-loose" spacing="extra-loose" justifyContent="center" alignItems="center">
<img src={NoActivity} width="120px" />
<Caption maxWidth="23ch" textAlign="center">
No activity yet.
No activity yet
</Caption>
</Stack>
);

View File

@@ -9,25 +9,17 @@ config.mode = 'production';
// Basically, disable any code splitting stuff
config.optimization = {
...config.optimization,
// flagIncludedChunks: false,
// concatenateModules: false,
minimize: shouldMinify,
moduleIds: 'deterministic',
splitChunks: {
chunks(chunk) {
return chunk.name !== 'background';
// Only enable code splitting on main bundle
return chunk.name === 'index';
},
// hidePathInfo: false,
// minSize: 10000,
// maxAsyncRequests: Infinity,
// maxInitialRequests: Infinity,
// cacheGroups: {
// commons: {
// test: /[\\/]node_modules[\\/]/,
// name: 'vendors',
// chunks: 'all',
// },l
// },
hidePathInfo: false,
minSize: 10000,
maxAsyncRequests: Infinity,
maxInitialRequests: Infinity,
},
...(shouldMinify
? {