ifdef-loader icon indicating copy to clipboard operation
ifdef-loader copied to clipboard

Improve documentation to include onlyCompileBundledFiles option

Open coreprocess opened this issue 4 years ago • 0 comments

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!

coreprocess avatar Jan 01 '20 15:01 coreprocess