How to use the pnp-webpack-plugin.tsLoaderOptions function in pnp-webpack-plugin

To help you get started, we’ve selected a few pnp-webpack-plugin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github connorshea / vglist / config / webpack / loaders / typescript.js View on Github external
const PnpWebpackPlugin = require('pnp-webpack-plugin');

module.exports = {
  test: /\.tsx?(\.erb)?$/,
  use: [
    {
      loader: 'ts-loader',
      options: PnpWebpackPlugin.tsLoaderOptions({
        appendTsSuffixTo: [/\.vue$/],

        // Using `fork-ts-checker-webpack-plugin` See:
        // https://github.com/TypeStrong/fork-ts-checker-webpack-plugin
        // to run type checking in a separate process, so `ts-loader` only does the
        // compilation work. Reduces compile time like crazy. See also:
        // https://github.com/TypeStrong/ts-loader#faster-builds
        transpileOnly: true
      })
    }
  ]
};
github TypeStrong / ts-loader / examples / yarn-pnp-fork-ts-checker-webpack-plugin / webpack.config.development.js View on Github external
new ForkTsCheckerWebpackPlugin(PnpWebpackPlugin.forkTsCheckerOptions({
            tslint: true, 
            useTypescriptIncrementalApi: false, // not possible to use this until: https://github.com/microsoft/TypeScript/issues/31056
        })),
        new ForkTsCheckerNotifierWebpackPlugin({ title: 'TypeScript', excludeWarnings: false }),
        new HtmlWebpackPlugin({
            inject: true,
            template: 'src/index.html'
        }),
    ],
    module: {
        rules: [
            {
                test: /.tsx?$/,
                loader: require.resolve("ts-loader"),
                options: PnpWebpackPlugin.tsLoaderOptions({ transpileOnly: true })
            }
        ]
    },
    resolve: {
      extensions: [".ts", ".tsx", ".js"],
      plugins: [PnpWebpackPlugin]
    },
    resolveLoader: {
      plugins: [PnpWebpackPlugin.moduleLoader(module)]
    },
    devtool: 'inline-source-map',
    devServer: {
        clientLogLevel: 'warning',
        open: true,
        historyApiFallback: true,
        stats: 'errors-only'
github microsoft / BotFramework-Composer / Composer / packages / client / config / webpack.config.js View on Github external
// "url" loader works like "file" loader except that it embeds assets
            // smaller than specified limit in bytes as data URLs to avoid requests.
            // A missing `test` is equivalent to a match.
            {
              test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
              loader: require.resolve('url-loader'),
              options: {
                limit: 10000,
                name: 'static/media/[name].[hash:8].[ext]',
              },
            },
            {
              test: /\.tsx?$/,
              include: paths.appSrc,
              loader: require.resolve('ts-loader'),
              options: PnpWebpackPlugin.tsLoaderOptions({
                transpileOnly: isEnvDevelopment,
                configFile: path.resolve(__dirname, '../tsconfig.build.json'),
              }),
            },
            // Process application JS with Babel.
            // The preset includes JSX, Flow, and some ESnext features.
            {
              test: /\.(js|jsx)$/,
              include: paths.appSrc,
              loader: require.resolve('babel-loader'),
              options: {
                customize: require.resolve('babel-preset-react-app/webpack-overrides'),

                plugins: [
                  [
                    require.resolve('babel-plugin-named-asset-import'),
github aarkerio / schnellentest / config / webpack / loaders / typescript.js View on Github external
const PnpWebpackPlugin = require('pnp-webpack-plugin');

module.exports = {
  test: /\.tsx?(\.erb)?$/,
  use: [
    {
      loader: 'ts-loader',
      options: PnpWebpackPlugin.tsLoaderOptions()
    }
  ]
};
github linrock / blitz-tactics / config / webpack / loaders / typescript.js View on Github external
const PnpWebpackPlugin = require('pnp-webpack-plugin')

module.exports = {
  test: /\.tsx?(\.erb)?$/,
  use: [
    {
      loader: 'ts-loader',
      options: PnpWebpackPlugin.tsLoaderOptions()
    }
  ]
}
github rails / webpacker / lib / install / loaders / typescript.js View on Github external
const PnpWebpackPlugin = require('pnp-webpack-plugin')

module.exports = {
  test: /\.tsx?(\.erb)?$/,
  use: [
    {
      loader: 'ts-loader',
      options: PnpWebpackPlugin.tsLoaderOptions()
    }
  ]
}
github linrock / blitz-tactics / config / webpack / environment.js View on Github external
const { environment } = require('@rails/webpacker')
const { VueLoaderPlugin } = require('vue-loader')
const vue = require('./loaders/vue')
const path = require('path');

environment.config.resolve.alias = {
  'jquery': 'backbone.native',
  '@blitz': path.resolve(__dirname, '../../app/javascript'),
}

environment.loaders.append('typescript', {
  test: /\.tsx?(\.erb)?$/,
  use: [
    {
      loader: 'ts-loader',
      options: PnpWebpackPlugin.tsLoaderOptions({
        appendTsSuffixTo: [/\.vue$/]
      }),
    }
  ]
})

environment.loaders.append('pug', {
  test: /\.pug$/,
  loader: 'pug-plain-loader'
})

environment.loaders.append('chess.js', {
  test: /chess\.js/,
  parser: {
    amd: false,
  }
github TypeStrong / ts-loader / examples / yarn-pnp-fork-ts-checker-webpack-plugin / webpack.config.production.js View on Github external
useShortDoctype: true,
                removeEmptyAttributes: true,
                removeStyleLinkTypeAttributes: true,
                keepClosingSlash: true,
                minifyJS: true,
                minifyCSS: true,
                minifyURLs: true,
            },
        }),
    ],
    module: {
        rules: [
            {
                test: /.tsx?$/,
                loader: require.resolve("ts-loader"),
                options: PnpWebpackPlugin.tsLoaderOptions({ transpileOnly: true })
            }
        ]
    },
    resolve: {
      extensions: [".ts", ".tsx", ".js"],
      plugins: [PnpWebpackPlugin]
    },
    resolveLoader: {
      plugins: [PnpWebpackPlugin.moduleLoader(module)]
    }
};
github 8398a7 / abilitysheet / config / webpack / loaders / typescript.js View on Github external
const PnpWebpackPlugin = require('pnp-webpack-plugin')

module.exports = {
  test: /\.(ts|tsx)?(\.erb)?$/,
  use: [
    {
      loader: 'ts-loader',
      options: PnpWebpackPlugin.tsLoaderOptions()
    }
  ]
}

pnp-webpack-plugin

plug'n'play resolver for Webpack

MIT
Latest version published 3 years ago

Package Health Score

67 / 100
Full package analysis