This repository was archived by the owner on Aug 7, 2021. It is now read-only.
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
Webpack not transpiling *.debug.* or *.release.* files #304
Open
Description
nativescript-dev-webpack@0.8.0
nativescript-worker-loader@0.8.1
webpack@3.2.0
In my application I have an environments folder with the following files:
environment.d.ts
environment.debug.ts
environment.release.ts
The environment file is referenced from other files in the application like this, and the d.ts file resolves the module import errors during development.
import { environment } from './../../environments/environment';
When doing a regular build with tns run <platform>
, the environment.debug.ts
file is renamed to environment.ts
when it is copied to the platform folder. It will copy the release version if I provide the --release
flag.
This does not work for webpack though. I get the following error:
Module not found: Error: Can't resolve './../../environments/environment'
It appears that the webpack plugin isn't taking these files into account. Is this a bug, or am I missing a Webpack loader?