mirror of
https://github.com/standardnotes/app
synced 2026-10-16 09:14:34 -04:00
* feat: Adds new i18n package and locale resolver * feat: Adds locale service * i18n(weekly-mr): Upgrade translations from crowdin (e1e05408). * feat: Adds copy plugin pattern * feat: Adds experimental feature flag and preferences section * feat: Adds injector and mobx store * feat: Adds boot flow * feat: Adds locale preference * Revert "i18n(weekly-mr): Upgrade translations from crowdin (e1e05408)." This reverts commit0f30f5840f. * i18n(weekly-mr): Upgrade translations from crowdin (fa494166). * Revert "i18n(weekly-mr): Upgrade translations from crowdin (fa494166)." This reverts commite1bd950995. * i18n(weekly-mr): Upgrade translations from crowdin (fa494166). * feat: Adds language selector and re-renders strings on locale update * feat: Adds error toast when loading language fails * feat: Localize date time strings * feat: Add fixes for specific string re-renders * feat: Localize dates that are pulled from models * feat: Fixes localization for snjs strings * feat: Add desktop localization * feat: Add mobile localization * fix: Fixes strings not re-rendering on locale change * feat: Fixes toggle and reloading behavior * feat: Update setting copy * feat: Adds spotlight modal * feat: Adds internal feature flag * feat: Fix modal styling * feat: Updates copy * feat: Loads persisted locale before app boot * fix: Avoids redundant desktop locale syncs and restores date-at-time format * feat: Improves service code * chore: Adds shared type * chore: Improves spotlight code * chore: Improves date handling code * chore: Small code tweaks * chore: Revert unrelated changes * fix: Fixes regressions * fix: Fixes regressions * fix: Fixes regressions * Revert "i18n(weekly-mr): Upgrade translations from crowdin (fa494166)." This reverts commitbbcc72cdde. * i18n(weekly-mr): Upgrade translations from crowdin (0927732f). * chore: Code and toggle animation improvements * chore: Add controller tests * chore: fixes eslint errors --------- Co-authored-by: L10n bot <service_account_73c4205ebb9a547d11aa5c7b26226660@noreply.gitlab.protontech.ch>
51 lines
1.8 KiB
JavaScript
51 lines
1.8 KiB
JavaScript
const { merge } = require('webpack-merge')
|
|
const config = require('./web.webpack.config.js')
|
|
const mergeWithEnvDefaults = require('./web.webpack-defaults.js')
|
|
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin')
|
|
|
|
module.exports = (env, argv) => {
|
|
const port = argv.port || 3001
|
|
mergeWithEnvDefaults(env)
|
|
return merge(config(env, argv), {
|
|
mode: 'development',
|
|
devtool: process.env.BUILD_TARGET === 'extension' ? 'cheap-module-source-map' : 'inline-source-map',
|
|
optimization: {
|
|
minimize: false,
|
|
},
|
|
output: {
|
|
publicPath: '/',
|
|
},
|
|
plugins: [new ReactRefreshWebpackPlugin()],
|
|
devServer: {
|
|
headers: {
|
|
'Access-Control-Allow-Origin': '*',
|
|
'Content-Security-Policy':
|
|
"default-src https: 'self'; base-uri 'self'; child-src * blob:; connect-src * blob:; font-src * data:; form-action 'self'; frame-ancestors * file:; frame-src * blob:; img-src 'self' * data: blob:; manifest-src 'self'; media-src 'self' blob: *.standardnotes.com; object-src 'self' blob: *.standardnotes.com; script-src 'self' 'sha256-r26E+iPOhx7KM7cKn4trOSoD8u5E7wL7wwJ8UrR+rGs=' 'unsafe-eval' 'wasm-unsafe-eval'; style-src *;",
|
|
},
|
|
hot: true,
|
|
static: './dist',
|
|
port,
|
|
historyApiFallback: {
|
|
disableDotRule: true,
|
|
rewrites: [
|
|
{ from: /^\/locales\//, to: (context) => context.parsedUrl.pathname },
|
|
{ from: /./, to: '/index.html' },
|
|
],
|
|
},
|
|
devMiddleware: {
|
|
writeToDisk: argv.writeToDisk,
|
|
},
|
|
proxy: {
|
|
'/assets': {
|
|
target: 'https://assets.standardnotes.com',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
pathRewrite: {
|
|
'^/assets': '',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
})
|
|
}
|