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

Add .ts to resolve.extensions #80

Merged
merged 2 commits into from
Dec 3, 2018
Merged

Add .ts to resolve.extensions #80

merged 2 commits into from
Dec 3, 2018

Conversation

mottox2
Copy link
Contributor

@mottox2 mottox2 commented Nov 22, 2018

@sw-yx Please check this.

Fix #79. I add '.ts' to resolve.extensions, so we can use these extensions as import.

refs. https://webpack.js.org/configuration/resolve/#resolve-extensions

Test

in Application directory with lambda

$ yarn add -D @babel-preset-typescript
$ ../netlify-lambda/bin/cmd.js build src/

netlify.toml

[build]
  functions = "functions"
  publish = "public"
  command = "npm run build"

.babelrc

{
  "presets": [
    "@babel/preset-typescript",
    [
      "@babel/preset-env",
      {
        "targets": {
          "node": "6.10.3"
        }
      }
    ]
  ],
  "plugins": [
    "@babel/plugin-proposal-class-properties",
    "@babel/plugin-transform-object-assign",
    "@babel/plugin-proposal-object-rest-spread"
  ]
}

@mottox2 mottox2 changed the title Add .ts and .mjs to resolve.extensions Add .ts to resolve.extensions Nov 22, 2018
@swyxio swyxio merged commit d3edd6d into netlify:master Dec 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typescript local import
2 participants