Skip to content

Commit

Permalink
Merge branch 'release-1.0.3' into fix/position-fixed-in-PWA
Browse files Browse the repository at this point in the history
  • Loading branch information
KRimwoo committed Feb 14, 2024
2 parents 97157f9 + fff3890 commit d13ebb7
Show file tree
Hide file tree
Showing 159 changed files with 14,452 additions and 2,502 deletions.
20 changes: 20 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { StorybookConfig } from '@storybook/nextjs'

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-onboarding',
'@storybook/addon-interactions',
'@storybook/addon-mdx-gfm'
],
framework: {
name: '@storybook/nextjs',
options: {},
},
docs: {
autodocs: 'tag',
},
}
export default config
15 changes: 15 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Preview } from '@storybook/react'

const preview: Preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
}

export default preview
20 changes: 17 additions & 3 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ const withPWA = require('@ducanh2912/next-pwa').default({
dest: 'public',
register: true,
skipWaiting: true,
disable: false,
// disable: prod ? false : true, 나중에 true로 바꿔야함
disable: prod ? false : true, // 나중에 true로 바꿔야함
// runtimeCaching,
})

const WorkboxPlugin = require('workbox-webpack-plugin')

const nextConfig = withPWA({
reactStrictMode: false,
compiler: {
Expand All @@ -27,6 +28,12 @@ const nextConfig = withPWA({
'kr1-api-object-storage.nhncloudservice.com',
],
},
// plugins: [
// new WorkboxPlugin.GenerateSW({
// clientsClaim: true,
// skipWaiting: true,
// }),
// ],
webpack(config) {
config.module.rules.push({
test: /\.svg$/i,
Expand All @@ -38,7 +45,14 @@ const nextConfig = withPWA({
},
})

// module.exports = nextConfig
const runtimeCaching = {
plugins: [
new WorkboxPlugin.GenerateSW({
clientsClaim: true,
skipWaiting: true,
}),
],
}

module.exports = nextConfig

Expand Down
Loading

0 comments on commit d13ebb7

Please sign in to comment.