mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-09 05:13:45 +00:00
27be460c07
* onboarding components, routing, steps * onboarding component, toc * fix onboarding mixin * header * refactor docs * fix layout * cleanup routing * docs routing * fix conventions * de en routing * docs, guide contents, nav * rem i18n support * fix routing from docs * rollup onwarn changes, preload * update svelte plugin, update rollup config * move docs * revert img style, remove code table * rem de completely * rollup optim, template * angular quickstart, quickstart overview page, update deps * fix link * pack, slug * prefetch binding, hidden links * export log * guards route ch * fix homepage * angular docs * docs * resolve fsh * overview * docs * docs * packages fix race condition * nav, home link * add vue, aspnet * doc optimizations * embed status pal * angular guide * angular guide * dotnet, angular guide * viewbox * typo * block onboarding route for non iam writers * set links from component data * fix: fetch org context in guard, more main cnt (#1192) * change get started guide, fix code blockquotes, typos * flutter guide * h2 spacing * highlight strong * plus * rm start sublinks * add proxy quickstart * regex * prevent outside click, fix project grant write Co-authored-by: Florian Forster <florian@caos.ch> Co-authored-by: Livio Amstutz <livio.a@gmail.com>
117 lines
3.3 KiB
JavaScript
117 lines
3.3 KiB
JavaScript
// eslint-disable-next-line import/no-named-as-default
|
|
import babel from '@rollup/plugin-babel';
|
|
import commonjs from '@rollup/plugin-commonjs';
|
|
import json from '@rollup/plugin-json';
|
|
import resolve from '@rollup/plugin-node-resolve';
|
|
import replace from '@rollup/plugin-replace';
|
|
import svelte from 'rollup-plugin-svelte';
|
|
import { terser } from 'rollup-plugin-terser';
|
|
import config from 'sapper/config/rollup.js';
|
|
|
|
import pkg from './package.json';
|
|
|
|
const mode = process.env.NODE_ENV;
|
|
const dev = mode === 'development';
|
|
const legacy = !!process.env.SAPPER_LEGACY_BUILD;
|
|
|
|
const onwarn = (warning, onwarn) =>
|
|
(warning.code === 'MISSING_EXPORT' && /'preload'/.test(warning.message)) ||
|
|
(warning.code === 'CIRCULAR_DEPENDENCY' && /[/\\]@sapper[/\\]/.test(warning.message)) ||
|
|
onwarn(warning);
|
|
|
|
export default {
|
|
client: {
|
|
input: config.client.input(),
|
|
output: config.client.output(),
|
|
plugins: [
|
|
replace({
|
|
'process.browser': true,
|
|
'process.env.NODE_ENV': JSON.stringify(mode)
|
|
}),
|
|
svelte({
|
|
compilerOptions: {
|
|
dev,
|
|
hydratable: true
|
|
}
|
|
}),
|
|
resolve({
|
|
browser: true,
|
|
dedupe: ['svelte']
|
|
}),
|
|
commonjs(),
|
|
|
|
legacy && babel({
|
|
extensions: ['.js', '.mjs', '.html', '.svelte'],
|
|
babelHelpers: 'runtime',
|
|
exclude: ['node_modules/@babel/**'],
|
|
presets: [
|
|
['@babel/preset-env', {
|
|
targets: '> 0.25%, not dead'
|
|
}]
|
|
],
|
|
plugins: [
|
|
'@babel/plugin-syntax-dynamic-import',
|
|
['@babel/plugin-transform-runtime', {
|
|
useESModules: true
|
|
}]
|
|
]
|
|
}),
|
|
|
|
!dev && terser({
|
|
module: true
|
|
}),
|
|
json()
|
|
],
|
|
|
|
preserveEntrySignatures: false,
|
|
onwarn
|
|
},
|
|
|
|
server: {
|
|
input: config.server.input(),
|
|
output: config.server.output(),
|
|
plugins: [
|
|
replace({
|
|
'process.browser': false,
|
|
'process.env.NODE_ENV': JSON.stringify(mode)
|
|
}),
|
|
svelte({
|
|
compilerOptions: {
|
|
dev,
|
|
generate: 'ssr',
|
|
hydratable: true
|
|
},
|
|
emitCss: false
|
|
}),
|
|
resolve({
|
|
dedupe: ['svelte']
|
|
}),
|
|
commonjs(),
|
|
json()
|
|
],
|
|
external: Object.keys(pkg.dependencies).concat(
|
|
require('module').builtinModules || Object.keys(process.binding('natives'))
|
|
),
|
|
|
|
preserveEntrySignatures: 'strict',
|
|
onwarn
|
|
},
|
|
|
|
serviceworker: {
|
|
input: config.serviceworker.input(),
|
|
output: config.serviceworker.output(),
|
|
plugins: [
|
|
resolve(),
|
|
replace({
|
|
'process.browser': true,
|
|
'process.env.NODE_ENV': JSON.stringify(mode)
|
|
}),
|
|
commonjs(),
|
|
// json(),
|
|
!dev && terser()
|
|
],
|
|
|
|
preserveEntrySignatures: false,
|
|
onwarn
|
|
}
|
|
}; |