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

Implement typescript support #64

Open
flegall opened this issue Apr 6, 2018 · 4 comments
Open

Implement typescript support #64

flegall opened this issue Apr 6, 2018 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@flegall
Copy link
Owner

flegall commented Apr 6, 2018

No description provided.

@flegall flegall added this to the v1.1 milestone Apr 6, 2018
@flegall flegall added the enhancement New feature or request label Apr 6, 2018
@bradstewart
Copy link

For what it's worth, this monopack.config.js file seems to be working for TypeScript code:

const merge = require('webpack-merge')

module.exports = {
  webpackConfigModifier: (defaultConfig) => {
    return merge(defaultConfig, {
      module: {
        rules: [
          {
            test: /\.ts$/,
            loader: 'ts-loader',
          }
        ]
      },

      resolve: {
        extensions: [ '.ts', 'js' ],
      },
      stats: {
        // suppress "export not found" warnings about re-exported types
        warningsFilter: /export .* was not found in/
      },
    })
  }
}

Should probably use fork-ts-checker-webpack-plugin to speed things up a bit, but the above works as a starting point.

@flegall
Copy link
Owner Author

flegall commented Apr 10, 2018

Nice ! :)

@murbanowicz
Copy link

murbanowicz commented Apr 19, 2019

I am trying to implement this, but I am getting error:

=>> monopack will resolve dependencies
=>> Undeclared dependencies
    @types/graphql from /home/marek/dev...

Any idea?

@flegall
Copy link
Owner Author

flegall commented Apr 24, 2019

Hi,

Sorry for the late reply, thanks for contributing !

Are you trying to implement the feature ? or using it as @bradstewart suggested ?

This warning tells you that you see to be have an undeclared dependency used somewhere :
Either : a dependency actually imported or required() or a peer dependency within your dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants