Skip to content

Improve documentation to include onlyCompileBundledFiles option #32

@coreprocess

Description

@coreprocess

The ts-loader config should include the onlyCompileBundledFiles: true option. Otherwise, files that are required to be pre-processed to be valid and are currently not imported might produce ghost errors. Adding this option will exclude these files from the build.

      {
        test: /\.ts$/,
        exclude: /node_modules/,
        use: [
          { loader: 'ts-loader', options: { onlyCompileBundledFiles: true } },
          { loader: 'ifdef-loader', options: { "ifdef-verbose": true, WEB: false, NODE: true } },
        ],
      },

It took me an hour to figure this out.

Excellent library, loving it!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions