@adlas/create-app 1.0.33 → 1.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { NextConfig } from 'next';
|
|
2
2
|
|
|
3
3
|
import createNextIntlPlugin from 'next-intl/plugin';
|
|
4
|
+
import withPWA from 'next-pwa';
|
|
4
5
|
|
|
5
6
|
// Define the base Next.js configuration
|
|
6
7
|
const baseConfig: NextConfig = {
|
|
@@ -9,9 +10,6 @@ const baseConfig: NextConfig = {
|
|
|
9
10
|
typescript: {
|
|
10
11
|
ignoreBuildErrors: false,
|
|
11
12
|
},
|
|
12
|
-
eslint: {
|
|
13
|
-
ignoreDuringBuilds: false,
|
|
14
|
-
},
|
|
15
13
|
images: {
|
|
16
14
|
// Optimized quality: 75 provides excellent visual quality at ~50% smaller file size
|
|
17
15
|
// Next.js automatically generates WebP/AVIF when browser supports it
|
|
@@ -24,7 +22,7 @@ const baseConfig: NextConfig = {
|
|
|
24
22
|
remotePatterns: [
|
|
25
23
|
{
|
|
26
24
|
protocol: 'https',
|
|
27
|
-
hostname: '
|
|
25
|
+
hostname: '**',
|
|
28
26
|
pathname: '/**',
|
|
29
27
|
},
|
|
30
28
|
],
|
|
@@ -35,9 +33,27 @@ const baseConfig: NextConfig = {
|
|
|
35
33
|
},
|
|
36
34
|
},
|
|
37
35
|
output: 'standalone',
|
|
36
|
+
webpack(config) {
|
|
37
|
+
// SVGR configuration for importing SVGs as React components
|
|
38
|
+
config.module.rules.push({
|
|
39
|
+
test: /\.svg$/i,
|
|
40
|
+
issuer: /\.[jt]sx?$/,
|
|
41
|
+
use: ['@svgr/webpack'],
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
return config;
|
|
45
|
+
},
|
|
38
46
|
};
|
|
39
47
|
|
|
48
|
+
// Configure PWA
|
|
49
|
+
const pwaConfig = withPWA({
|
|
50
|
+
dest: 'public',
|
|
51
|
+
register: true,
|
|
52
|
+
skipWaiting: true,
|
|
53
|
+
disable: process.env.NODE_ENV === 'development',
|
|
54
|
+
})(baseConfig);
|
|
55
|
+
|
|
40
56
|
// Initialize the Next-Intl plugin
|
|
41
|
-
const configWithPlugins = createNextIntlPlugin('./src/libs/I18n.ts')(
|
|
57
|
+
const configWithPlugins = createNextIntlPlugin('./src/libs/I18n.ts')(pwaConfig);
|
|
42
58
|
|
|
43
59
|
export default configWithPlugins;
|