Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin doesn't pass files to next plugin (babel) -- need to add TS extensions to Babel plugin #108

Closed
onoshkodaniil opened this issue Aug 28, 2018 · 8 comments
Labels
kind: support Asking for support with something or a specific use case scope: docs Documentation could be improved. Or changes that only affect docs scope: integration Related to an integration, not necessarily to core (but could influence core) solution: already possible This is already possible / this feature already exists

Comments

@onoshkodaniil
Copy link

onoshkodaniil commented Aug 28, 2018

What happens and why it is wrong

My plugins:

// ...
	typescript(),
	babel({
		runtimeHelpers: true
	}),
// ...

output script is doesn't transformed.

If I remove all typescript things from rollup config and set input file to 'lib/index.es.js' - output script is successfully transformed.

You can reproduce it with my project:
https://github.com/TrigenSoftware/flexis-redux/tree/upd-deps-wip

npm i
npm run build

plugin output with verbosity 3

log:
rpt2: typescript version: 3.0.1
rpt2: tslib version: 1.9.3
rpt2: rollup-plugin-typescript2 version: 0.17.0
rpt2: plugin options:
{
    "verbosity": 3,
    "check": true,
    "clean": false,
    "cacheRoot": "/Users/dangreen/github/flexis-redux/.rpt2_cache",
    "include": [
        "*.ts+(|x)",
        "**/*.ts+(|x)"
    ],
    "exclude": [
        "*.d.ts",
        "**/*.d.ts"
    ],
    "abortOnError": true,
    "rollupCommonJSResolveHack": false,
    "typescript": "version 3.0.1",
    "useTsconfigDeclarationDir": false,
    "tsconfigOverride": {},
    "transformers": [],
    "tsconfigDefaults": {},
    "objectHashIgnoreUnknownHack": false
}
rpt2: rollup config:
{
    "experimentalCacheExpiry": 10,
    "inlineDynamicImports": false,
    "input": "src/index.ts",
    "chunkGroupingSize": 5000,
    "perf": false,
    "plugins": [
        {
            "name": "tslint",
            "sourceMap": false
        },
        {
            "name": "commonjs"
        },
        {
            "name": "rpt2"
        },
        {
            "name": "babel"
        },
        {
            "name": "node-resolve"
        },
        {}
    ],
    "entry": "src/index.ts"
}
rpt2: built-in options overrides: {
    "noEmitHelpers": false,
    "importHelpers": true,
    "noResolve": false,
    "noEmit": false,
    "inlineSourceMap": false,
    "outDir": "/Users/dangreen/github/flexis-redux/.rpt2_cache/placeholder",
    "moduleResolution": 2,
    "declarationDir": "/Users/dangreen/github/flexis-redux",
    "sourceRoot": null
}
rpt2: parsed tsconfig: {
    "options": {
        "module": 6,
        "declaration": true,
        "declarationMap": true,
        "moduleResolution": 2,
        "target": 6,
        "jsx": 2,
        "noUnusedLocals": true,
        "noUnusedParameters": true,
        "noImplicitAny": false,
        "allowSyntheticDefaultImports": true,
        "esModuleInterop": true,
        "experimentalDecorators": true,
        "inlineSourceMap": false,
        "lib": [
            "lib.esnext.d.ts"
        ],
        "configFilePath": "/Users/dangreen/github/flexis-redux/tsconfig.json",
        "noEmitHelpers": false,
        "importHelpers": true,
        "noResolve": false,
        "noEmit": false,
        "outDir": "/Users/dangreen/github/flexis-redux/.rpt2_cache/placeholder",
        "declarationDir": "/Users/dangreen/github/flexis-redux",
        "sourceRoot": null
    },
    "fileNames": [
        "/Users/dangreen/github/flexis-redux/src/index.ts"
    ],
    "typeAcquisition": {
        "enable": false,
        "include": [],
        "exclude": []
    },
    "raw": {
        "compilerOptions": {
            "module": "esnext",
            "declaration": true,
            "declarationMap": true,
            "moduleResolution": "node",
            "target": "esnext",
            "jsx": "react",
            "noUnusedLocals": true,
            "noUnusedParameters": true,
            "noImplicitAny": false,
            "allowSyntheticDefaultImports": true,
            "esModuleInterop": true,
            "experimentalDecorators": true,
            "inlineSourceMap": true,
            "lib": [
                "esnext"
            ]
        },
        "include": [
            "src/index.ts"
        ],
        "exclude": [
            "lib/**/*"
        ],
        "compileOnSave": false
    },
    "errors": [],
    "wildcardDirectories": {},
    "compileOnSave": false,
    "configFileSpecs": {
        "includeSpecs": [
            "src/index.ts"
        ],
        "excludeSpecs": [
            "lib/**/*"
        ],
        "validatedIncludeSpecs": [
            "src/index.ts"
        ],
        "validatedExcludeSpecs": [
            "lib/**/*"
        ],
        "wildcardDirectories": {}
    }
}
rpt2: included:
'[
    "*.ts+(|x)",
    "**/*.ts+(|x)"
]'
rpt2: excluded:
'[
    "*.d.ts",
    "**/*.d.ts"
]'
rpt2: Ambient types:
rpt2:     /Users/dangreen/github/flexis-redux/node_modules/@types/estree/index.d.ts
rpt2:     /Users/dangreen/github/flexis-redux/node_modules/@types/events/index.d.ts
rpt2:     /Users/dangreen/github/flexis-redux/node_modules/@types/fs-extra/index.d.ts
rpt2:     /Users/dangreen/github/flexis-redux/node_modules/@types/glob/index.d.ts
rpt2:     /Users/dangreen/github/flexis-redux/node_modules/@types/handlebars/index.d.ts
rpt2:     /Users/dangreen/github/flexis-redux/node_modules/@types/highlight.js/index.d.ts
rpt2:     /Users/dangreen/github/flexis-redux/node_modules/@types/jest/index.d.ts
rpt2:     /Users/dangreen/github/flexis-redux/node_modules/@types/lodash/index.d.ts
rpt2:     /Users/dangreen/github/flexis-redux/node_modules/@types/marked/index.d.ts
rpt2:     /Users/dangreen/github/flexis-redux/node_modules/@types/minimatch/index.d.ts
rpt2:     /Users/dangreen/github/flexis-redux/node_modules/@types/node/index.d.ts
rpt2:     /Users/dangreen/github/flexis-redux/node_modules/@types/prop-types/index.d.ts
rpt2:     /Users/dangreen/github/flexis-redux/node_modules/@types/react/index.d.ts
rpt2:     /Users/dangreen/github/flexis-redux/node_modules/@types/shelljs/index.d.ts
rpt2: transpiling '/Users/dangreen/github/flexis-redux/src/index.ts'
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/code/cache/db9b1deed2ca4c165b5a5fb4241efc96ab5c078b'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/syntacticDiagnostics/cache/db9b1deed2ca4c165b5a5fb4241efc96ab5c078b'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/semanticDiagnostics/cache/db9b1deed2ca4c165b5a5fb4241efc96ab5c078b'
rpt2:     cache hit
rpt2: generated declarations for '/Users/dangreen/github/flexis-redux/src/index.ts'
rpt2: dependency '/Users/dangreen/github/flexis-redux/src/Store.ts'
rpt2:     imported by '/Users/dangreen/github/flexis-redux/src/index.ts'
rpt2: resolving './Store'
rpt2:     to '/Users/dangreen/github/flexis-redux/src/Store.ts'
rpt2: dependency '/Users/dangreen/github/flexis-redux/src/Reducer.ts'
rpt2:     imported by '/Users/dangreen/github/flexis-redux/src/index.ts'
rpt2: resolving './Reducer'
rpt2:     to '/Users/dangreen/github/flexis-redux/src/Reducer.ts'
rpt2: dependency '/Users/dangreen/github/flexis-redux/src/Provider.tsx'
rpt2:     imported by '/Users/dangreen/github/flexis-redux/src/index.ts'
rpt2: resolving './Provider'
rpt2:     to '/Users/dangreen/github/flexis-redux/src/Provider.tsx'
rpt2: dependency '/Users/dangreen/github/flexis-redux/src/Connect.tsx'
rpt2:     imported by '/Users/dangreen/github/flexis-redux/src/index.ts'
rpt2: resolving './Connect'
rpt2:     to '/Users/dangreen/github/flexis-redux/src/Connect.tsx'
rpt2: transpiling '/Users/dangreen/github/flexis-redux/src/Store.ts'
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/code/cache/5882719453155cbf82d077af26036114dc06e93b'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/syntacticDiagnostics/cache/5882719453155cbf82d077af26036114dc06e93b'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/semanticDiagnostics/cache/5882719453155cbf82d077af26036114dc06e93b'
rpt2:     cache hit
rpt2: generated declarations for '/Users/dangreen/github/flexis-redux/src/Store.ts'
rpt2: transpiling '/Users/dangreen/github/flexis-redux/src/Reducer.ts'
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/code/cache/d000b2273d3e7a07157ba2334cc6e6b5d5b14dd9'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/syntacticDiagnostics/cache/d000b2273d3e7a07157ba2334cc6e6b5d5b14dd9'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/semanticDiagnostics/cache/d000b2273d3e7a07157ba2334cc6e6b5d5b14dd9'
rpt2:     cache hit
rpt2: generated declarations for '/Users/dangreen/github/flexis-redux/src/Reducer.ts'
rpt2: transpiling '/Users/dangreen/github/flexis-redux/src/Provider.tsx'
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/code/cache/faee82575e02807fe1abf7d0d5186a46d7cd1237'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/syntacticDiagnostics/cache/faee82575e02807fe1abf7d0d5186a46d7cd1237'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/semanticDiagnostics/cache/faee82575e02807fe1abf7d0d5186a46d7cd1237'
rpt2:     cache hit
rpt2: generated declarations for '/Users/dangreen/github/flexis-redux/src/Provider.tsx'
rpt2: transpiling '/Users/dangreen/github/flexis-redux/src/Connect.tsx'
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/code/cache/24a621b930e65e40b9b67dc935ba0f1a03fd6deb'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/syntacticDiagnostics/cache/24a621b930e65e40b9b67dc935ba0f1a03fd6deb'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/semanticDiagnostics/cache/24a621b930e65e40b9b67dc935ba0f1a03fd6deb'
rpt2:     cache hit
rpt2: generated declarations for '/Users/dangreen/github/flexis-redux/src/Connect.tsx'
rpt2: dependency '/Users/dangreen/github/flexis-redux/src/Reducer.ts'
rpt2:     imported by '/Users/dangreen/github/flexis-redux/src/Store.ts'
rpt2: resolving './Reducer'
rpt2:     to '/Users/dangreen/github/flexis-redux/src/Reducer.ts'
rpt2: dependency '/Users/dangreen/github/flexis-redux/src/utils/proto.ts'
rpt2:     imported by '/Users/dangreen/github/flexis-redux/src/Reducer.ts'
rpt2: resolving './utils/proto'
rpt2:     to '/Users/dangreen/github/flexis-redux/src/utils/proto.ts'
rpt2: dependency '/Users/dangreen/github/flexis-redux/src/Actions.ts'
rpt2:     imported by '/Users/dangreen/github/flexis-redux/src/Reducer.ts'
rpt2: resolving './Actions'
rpt2:     to '/Users/dangreen/github/flexis-redux/src/Actions.ts'
rpt2: dependency '/Users/dangreen/github/flexis-redux/src/Store.ts'
rpt2:     imported by '/Users/dangreen/github/flexis-redux/src/Provider.tsx'
rpt2: resolving './Store'
rpt2:     to '/Users/dangreen/github/flexis-redux/src/Store.ts'
rpt2: dependency '/Users/dangreen/github/flexis-redux/src/StoreContext.ts'
rpt2:     imported by '/Users/dangreen/github/flexis-redux/src/Provider.tsx'
rpt2: resolving './StoreContext'
rpt2:     to '/Users/dangreen/github/flexis-redux/src/StoreContext.ts'
rpt2: dependency '/Users/dangreen/github/flexis-redux/src/utils/Selector.ts'
rpt2:     imported by '/Users/dangreen/github/flexis-redux/src/Connect.tsx'
rpt2: resolving './utils/Selector'
rpt2:     to '/Users/dangreen/github/flexis-redux/src/utils/Selector.ts'
rpt2: dependency '/Users/dangreen/github/flexis-redux/src/StoreContext.ts'
rpt2:     imported by '/Users/dangreen/github/flexis-redux/src/Connect.tsx'
rpt2: resolving './StoreContext'
rpt2:     to '/Users/dangreen/github/flexis-redux/src/StoreContext.ts'
rpt2: transpiling '/Users/dangreen/github/flexis-redux/src/utils/proto.ts'
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/code/cache/8122b0586456154985455f1e45eeb49174f766ca'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/syntacticDiagnostics/cache/8122b0586456154985455f1e45eeb49174f766ca'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/semanticDiagnostics/cache/8122b0586456154985455f1e45eeb49174f766ca'
rpt2:     cache hit
rpt2: generated declarations for '/Users/dangreen/github/flexis-redux/src/utils/proto.ts'
rpt2: transpiling '/Users/dangreen/github/flexis-redux/src/Actions.ts'
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/code/cache/c7ff7693e85e0bf4afe07c219c0d2caad729783d'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/syntacticDiagnostics/cache/c7ff7693e85e0bf4afe07c219c0d2caad729783d'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/semanticDiagnostics/cache/c7ff7693e85e0bf4afe07c219c0d2caad729783d'
rpt2:     cache hit
rpt2: generated declarations for '/Users/dangreen/github/flexis-redux/src/Actions.ts'
rpt2: transpiling '/Users/dangreen/github/flexis-redux/src/StoreContext.ts'
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/code/cache/f0f6e8e02671852467e839d18ad5a729bff548e5'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/syntacticDiagnostics/cache/f0f6e8e02671852467e839d18ad5a729bff548e5'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/semanticDiagnostics/cache/f0f6e8e02671852467e839d18ad5a729bff548e5'
rpt2:     cache hit
rpt2: generated declarations for '/Users/dangreen/github/flexis-redux/src/StoreContext.ts'
rpt2: transpiling '/Users/dangreen/github/flexis-redux/src/utils/Selector.ts'
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/code/cache/322a6cfb5ad3ee3bd3d80824119fc554421ec08f'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/syntacticDiagnostics/cache/322a6cfb5ad3ee3bd3d80824119fc554421ec08f'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/semanticDiagnostics/cache/322a6cfb5ad3ee3bd3d80824119fc554421ec08f'
rpt2:     cache hit
rpt2: generated declarations for '/Users/dangreen/github/flexis-redux/src/utils/Selector.ts'
rpt2: dependency '/Users/dangreen/github/flexis-redux/src/utils/proto.ts'
rpt2:     imported by '/Users/dangreen/github/flexis-redux/src/Actions.ts'
rpt2: resolving './utils/proto'
rpt2:     to '/Users/dangreen/github/flexis-redux/src/utils/proto.ts'
rpt2: dependency '/Users/dangreen/github/flexis-redux/src/utils/mergeProps.ts'
rpt2:     imported by '/Users/dangreen/github/flexis-redux/src/utils/Selector.ts'
rpt2: resolving './mergeProps'
rpt2:     to '/Users/dangreen/github/flexis-redux/src/utils/mergeProps.ts'
rpt2: dependency '/Users/dangreen/github/flexis-redux/src/utils/initMapFunction.ts'
rpt2:     imported by '/Users/dangreen/github/flexis-redux/src/utils/Selector.ts'
rpt2: resolving './initMapFunction'
rpt2:     to '/Users/dangreen/github/flexis-redux/src/utils/initMapFunction.ts'
rpt2: dependency '/Users/dangreen/github/flexis-redux/src/utils/isEqual.ts'
rpt2:     imported by '/Users/dangreen/github/flexis-redux/src/utils/Selector.ts'
rpt2: resolving './isEqual'
rpt2:     to '/Users/dangreen/github/flexis-redux/src/utils/isEqual.ts'
rpt2: transpiling '/Users/dangreen/github/flexis-redux/src/utils/mergeProps.ts'
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/code/cache/dc8e9beac0cbf73c17f9035b2b004394ab0c2663'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/syntacticDiagnostics/cache/dc8e9beac0cbf73c17f9035b2b004394ab0c2663'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/semanticDiagnostics/cache/dc8e9beac0cbf73c17f9035b2b004394ab0c2663'
rpt2:     cache hit
rpt2: generated declarations for '/Users/dangreen/github/flexis-redux/src/utils/mergeProps.ts'
rpt2: transpiling '/Users/dangreen/github/flexis-redux/src/utils/initMapFunction.ts'
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/code/cache/60bc2d48200151122ebba7971e016299fe149c62'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/syntacticDiagnostics/cache/60bc2d48200151122ebba7971e016299fe149c62'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/semanticDiagnostics/cache/60bc2d48200151122ebba7971e016299fe149c62'
rpt2:     cache hit
rpt2: generated declarations for '/Users/dangreen/github/flexis-redux/src/utils/initMapFunction.ts'
rpt2: transpiling '/Users/dangreen/github/flexis-redux/src/utils/isEqual.ts'
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/code/cache/b36ec59bb8ccd40a584f32f30476fd2a73312e44'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/syntacticDiagnostics/cache/b36ec59bb8ccd40a584f32f30476fd2a73312e44'
rpt2:     cache hit
rpt2:     cache: '/Users/dangreen/github/flexis-redux/.rpt2_cache/rpt2_e5843b409a5cd3d2f309b90db1c7fc57e2f80d73/semanticDiagnostics/cache/b36ec59bb8ccd40a584f32f30476fd2a73312e44'
rpt2:     cache hit
rpt2: generated declarations for '/Users/dangreen/github/flexis-redux/src/utils/isEqual.ts'
rpt2: generating target 1
rpt2: rolling caches
rpt2: generating target 2
rpt2: rolling caches
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/index.ts' to '/Users/dangreen/github/flexis-redux/lib/index.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/index.ts' to '/Users/dangreen/github/flexis-redux/lib/index.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/Store.ts' to '/Users/dangreen/github/flexis-redux/lib/Store.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/Store.ts' to '/Users/dangreen/github/flexis-redux/lib/Store.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/Reducer.ts' to '/Users/dangreen/github/flexis-redux/lib/Reducer.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/Reducer.ts' to '/Users/dangreen/github/flexis-redux/lib/Reducer.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/Provider.tsx' to '/Users/dangreen/github/flexis-redux/lib/Provider.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/Provider.tsx' to '/Users/dangreen/github/flexis-redux/lib/Provider.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/Connect.tsx' to '/Users/dangreen/github/flexis-redux/lib/Connect.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/Connect.tsx' to '/Users/dangreen/github/flexis-redux/lib/Connect.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/utils/proto.ts' to '/Users/dangreen/github/flexis-redux/lib/utils/proto.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/utils/proto.ts' to '/Users/dangreen/github/flexis-redux/lib/utils/proto.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/Actions.ts' to '/Users/dangreen/github/flexis-redux/lib/Actions.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/Actions.ts' to '/Users/dangreen/github/flexis-redux/lib/Actions.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/StoreContext.ts' to '/Users/dangreen/github/flexis-redux/lib/StoreContext.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/StoreContext.ts' to '/Users/dangreen/github/flexis-redux/lib/StoreContext.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/utils/Selector.ts' to '/Users/dangreen/github/flexis-redux/lib/utils/Selector.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/utils/Selector.ts' to '/Users/dangreen/github/flexis-redux/lib/utils/Selector.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/utils/mergeProps.ts' to '/Users/dangreen/github/flexis-redux/lib/utils/mergeProps.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/utils/mergeProps.ts' to '/Users/dangreen/github/flexis-redux/lib/utils/mergeProps.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/utils/initMapFunction.ts' to '/Users/dangreen/github/flexis-redux/lib/utils/initMapFunction.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/utils/initMapFunction.ts' to '/Users/dangreen/github/flexis-redux/lib/utils/initMapFunction.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/utils/isEqual.ts' to '/Users/dangreen/github/flexis-redux/lib/utils/isEqual.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/utils/isEqual.ts' to '/Users/dangreen/github/flexis-redux/lib/utils/isEqual.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/index.ts' to '/Users/dangreen/github/flexis-redux/lib/index.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/index.ts' to '/Users/dangreen/github/flexis-redux/lib/index.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/Store.ts' to '/Users/dangreen/github/flexis-redux/lib/Store.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/Store.ts' to '/Users/dangreen/github/flexis-redux/lib/Store.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/Reducer.ts' to '/Users/dangreen/github/flexis-redux/lib/Reducer.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/Reducer.ts' to '/Users/dangreen/github/flexis-redux/lib/Reducer.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/Provider.tsx' to '/Users/dangreen/github/flexis-redux/lib/Provider.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/Provider.tsx' to '/Users/dangreen/github/flexis-redux/lib/Provider.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/Connect.tsx' to '/Users/dangreen/github/flexis-redux/lib/Connect.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/Connect.tsx' to '/Users/dangreen/github/flexis-redux/lib/Connect.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/utils/proto.ts' to '/Users/dangreen/github/flexis-redux/lib/utils/proto.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/utils/proto.ts' to '/Users/dangreen/github/flexis-redux/lib/utils/proto.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/Actions.ts' to '/Users/dangreen/github/flexis-redux/lib/Actions.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/Actions.ts' to '/Users/dangreen/github/flexis-redux/lib/Actions.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/StoreContext.ts' to '/Users/dangreen/github/flexis-redux/lib/StoreContext.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/StoreContext.ts' to '/Users/dangreen/github/flexis-redux/lib/StoreContext.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/utils/Selector.ts' to '/Users/dangreen/github/flexis-redux/lib/utils/Selector.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/utils/Selector.ts' to '/Users/dangreen/github/flexis-redux/lib/utils/Selector.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/utils/mergeProps.ts' to '/Users/dangreen/github/flexis-redux/lib/utils/mergeProps.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/utils/mergeProps.ts' to '/Users/dangreen/github/flexis-redux/lib/utils/mergeProps.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/utils/initMapFunction.ts' to '/Users/dangreen/github/flexis-redux/lib/utils/initMapFunction.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/utils/initMapFunction.ts' to '/Users/dangreen/github/flexis-redux/lib/utils/initMapFunction.d.ts.map'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/utils/isEqual.ts' to '/Users/dangreen/github/flexis-redux/lib/utils/isEqual.d.ts'
rpt2: writing declarations for '/Users/dangreen/github/flexis-redux/src/utils/isEqual.ts' to '/Users/dangreen/github/flexis-redux/lib/utils/isEqual.d.ts.map'
@ezolenko
Copy link
Owner

rtp2 transpiles code, but doesn't change file extension (there is no way to do that in rollup as far as I know). Babel plugin, even though it claims it processes all files, only looks at code with those extensions by default: .js,.jsx,.es6,.es,.mjs.

If you add .ts and .tsx to that list (extensions property somewhere), everything should work.

@onoshkodaniil
Copy link
Author

onoshkodaniil commented Aug 29, 2018

@ezolenko thanks! Seems behaviour of babel plugin was changed in last updates.

My solution of this problem:

// ...
import { DEFAULT_EXTENSIONS } from '@babel/core';
// ...
	babel({
		extensions: [
			...DEFAULT_EXTENSIONS,
			'ts',
			'tsx'
		],
		runtimeHelpers: true
	}),
// ...

@jakegavin
Copy link

I just spent a lot of time debugging this -- wish I'd found the issue sooner. Thanks for the solution!

@ezolenko Would you be open to PR adding a section adding a section mentioning this to the documentation? It took me longer than I care to admit to find this issue and I've seen other people (on my team and in open source) repeating this mistake. I'd be happy to try to write a paragraph for the readme that might save others some time if you're hope to it.

@ezolenko
Copy link
Owner

ezolenko commented May 9, 2019

@jakegavin sure, a PR would be nice

@ezolenko
Copy link
Owner

@jakegavin nvm, I added a bit in readme. Could you check if code snipped is correct? (should extensions have dots in front or it doesn't mater?)

@jakegavin
Copy link

jakegavin commented May 11, 2019

@ezolenko Sorry I didn't get to it yesterday. I havent merged the change in my project yet but thats basically what I have and it appears to be working well locally.

I don't think runtimeHelpers: true is required for rtp2 but I'm not familiar with the option. I think that might be left over from the original code snippet in this issue.

Thanks!

@geoffp
Copy link

geoffp commented Aug 9, 2019

@ezolenko I have a build that uses preserveModules and therefore needs the output file names (and the import statements that refer to them) to be correct. I've managed to get it working, because I just came across this: https://github.com/GiG/rollup-plugin-rename-extensions

Apparently they've discovered the way to rename output files!

This works for me:

const renameExtensionsConfig = {
  include: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
  mappings: {
    '.ts': '.js',
    '.tsx': '.js'
  }
};
const plugins = [
  nodeResolve(),
  peerDepsAsExternal({ includeDependencies: true }),
  typescript(),
  renameExtensions(renameExtensionsConfig),
  babel(babelConfig),
  postcss(postCSSConfig)
];

But it would be even better if this plugin could co-opt the technique they're using and produce correct filenames on its own.

Thanks for all your hard work on this!

@agilgur5 agilgur5 changed the title Plugin doesn't pass files to next plugin (babel). Plugin doesn't pass files to next plugin (babel) -- need to add TS extensions to Babel plugin May 11, 2022
@agilgur5 agilgur5 added scope: integration Related to an integration, not necessarily to core (but could influence core) kind: support Asking for support with something or a specific use case scope: docs Documentation could be improved. Or changes that only affect docs solution: already possible This is already possible / this feature already exists labels May 11, 2022
@agilgur5
Copy link
Collaborator

agilgur5 commented May 11, 2022

rollup-plugin-rename-extensions is interesting 👀 .
I see it changes a few things with the fileName etc here.

It is in a generateBundle hook though, whereas rpt2 doesn't output JS, it just uses transform on TS files (it does output declarations and declaration maps however). Though it might be possible to add something like that in rpt2's own generateBundle?

There are probably some gotchas with that though, like I see it also re-parses files and changes extensions in import statements etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: support Asking for support with something or a specific use case scope: docs Documentation could be improved. Or changes that only affect docs scope: integration Related to an integration, not necessarily to core (but could influence core) solution: already possible This is already possible / this feature already exists
Projects
None yet
Development

No branches or pull requests

5 participants