You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.
parallel-webpack uses interpret to load configuration files in different languages based on the file extension. This usually works great, but in some cases it may be unwanted behavior.
I have a build script that calls parallel-webpack using the Node API. This script is written in TypeScript and executed using ts-node. My configuration file is TypeScript as well and has the .ts extension. This causes parallel-webpack to add an additional TypeScript interpreter even though it is already running inside of ts-node.
Behaviour
parallel-webpack will break when trying to compile the .ts file that has already been transpiled to javascript by ts-node.
Workaround
I created a separate webpack.config.proxy.js, that only contains the following line:
module.exports = require('./webpack.config.ts');
This will prevent parallel-webpack from trying to interpret the config file as TypeScript.
Feature request
It would be nice to force parallel-webpack to interpret a file as plain javascript, even though it has a different file extension. For example:
var run = require('parallel-webpack').run,
configPath = require.resolve('./webpack.config.ts');
run(configPath, { useConfigLoader: false });
Provide your Environment details
Node version: any
Operating System: any
webpack version: any
parallel-webpack version: 2.3.0
The text was updated successfully, but these errors were encountered:
Explain the problem
parallel-webpack uses
interpret
to load configuration files in different languages based on the file extension. This usually works great, but in some cases it may be unwanted behavior.I have a build script that calls parallel-webpack using the Node API. This script is written in TypeScript and executed using
ts-node
. My configuration file is TypeScript as well and has the.ts
extension. This causes parallel-webpack to add an additional TypeScript interpreter even though it is already running inside ofts-node
.Behaviour
parallel-webpack will break when trying to compile the
.ts
file that has already been transpiled to javascript byts-node
.Workaround
I created a separate
webpack.config.proxy.js
, that only contains the following line:This will prevent parallel-webpack from trying to interpret the config file as TypeScript.
Feature request
It would be nice to force
parallel-webpack
to interpret a file as plain javascript, even though it has a different file extension. For example:Provide your Environment details
The text was updated successfully, but these errors were encountered: