Skip to content

Commit

Permalink
feat: DevTools correctly ommitted at production
Browse files Browse the repository at this point in the history
  • Loading branch information
stepan662 committed Jan 27, 2023
1 parent aeafee1 commit 2352f83
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 36 deletions.
2 changes: 1 addition & 1 deletion e2e/tsconfig.json
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es5",
"target": "es2017",
"lib": ["es5", "dom", "es2020"],
"types": ["cypress", "cypress-xpath/src"],
"checkJs": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/i18next/tsconfig.json
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es5",
"target": "es2017",
"moduleResolution": "node",
"module": "esnext",
"sourceMap": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/ngx/projects/ngx-tolgee/tsconfig.lib.json
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"outDir": "../../out-tsc/lib",
"declarationMap": true,
"target": "es2015",
"target": "es2017",
"declaration": true,
"inlineSources": true,
"types": [],
Expand Down
2 changes: 1 addition & 1 deletion packages/ngx/tsconfig.json
Expand Up @@ -10,7 +10,7 @@
"module": "es2020",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"target": "es2017",
"typeRoots": [
"node_modules/@types"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/react/tsconfig.json
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es5",
"target": "es2017",
"module": "esnext",
"declaration": true,
"outDir": "./lib",
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/tsconfig.json
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es5",
"target": "es2017",
"module": "esnext",
"rootDir": "src",
"sourceMap": true,
Expand Down
29 changes: 2 additions & 27 deletions packages/web/rollup.common.js
Expand Up @@ -69,7 +69,7 @@ const packageOutput = (name, format, ext) => {
];
};

const buildPackage = ({ input, name, plugins = [], umdName }) => ({
export const buildPackage = ({ input, name }) => ({
...commonConfig,
input,
output: [
Expand All @@ -78,30 +78,5 @@ const buildPackage = ({ input, name, plugins = [], umdName }) => ({
...packageOutput(name, 'esm', 'mjs'),
...packageOutput(name, 'umd', 'js'),
],
plugins: [...plugins, ...commonPlugins],
plugins: commonPlugins,
});

export const buildMain = () => [
buildPackage({
input: 'src/entry-development.ts',
name: 'web.development',
umdName: 'web',
}),
buildPackage({
input: 'src/entry-production.ts',
name: 'web.production',
umdName: 'web',
}),
buildPackage({
input: 'src/entry-universal.ts',
name: 'web.universal',
umdName: 'web',
}),

// dev tools
buildPackage({
input: 'src/entry-tools.ts',
name: 'in-context-tools',
umdName: 'tools',
}),
];
23 changes: 21 additions & 2 deletions packages/web/rollup.config.js
@@ -1,3 +1,22 @@
import { buildMain } from './rollup.common';
import { buildPackage } from './rollup.common';

export default [...buildMain()];
export default [
// buildPackage({
// input: 'src/entry-development.ts',
// name: 'web.development',
// }),
buildPackage({
input: 'src/entry-production.ts',
name: 'web.production',
}),
// buildPackage({
// input: 'src/entry-universal.ts',
// name: 'web.universal',
// }),

// // in-context tools
// buildPackage({
// input: 'src/entry-tools.ts',
// name: 'in-context-tools',
// }),
];
2 changes: 1 addition & 1 deletion packages/web/tsconfig.json
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es5",
"target": "es2017",
"module": "esnext",
"sourceMap": true,
"rootDir": "./src",
Expand Down

0 comments on commit 2352f83

Please sign in to comment.