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 was archived by the owner on Aug 7, 2021. It is now read-only.
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
CLI: 5.2.0
Cross-platform modules: ~5.2.0
nativescript-vue: ~2.0.0
Android Runtime: 5.2.1
iOS Runtime: 5.2.0
Plugin(s):
Node.js: 10.13.0
Please, attach your package.json and webpack.config.js as these configurations are usually critical for investigating issues with webpack
Describe the bug
When developing an plugin it is common to symlink your plugin in a test application rather than use a archived tgz file. When such symlink plugin is used inside a NativeScript + VueJs application and the "--bundle" flag is passed to tns run a constant rebuild if the project is triggered. The plugin that is used with symlink has a tsconfig.json file with "declaration": true, this is critical in reproducing the issue.
mcsofamiorkov:demo-vue amiorkov$ tns run ios --bundle
Skipping node_modules folder! Use the syncAllFiles option to sync files from this folder.
Searching for devices...
Hook skipped because bundling is in progress.
Running webpack for iOS...
Bundling application for entryPath ./app...
clean-webpack-plugin: /Users/amiorkov/Desktop/Work/nativescript-picker/demo-vue/platforms/ios/demovue/app/**/* has been removed.
File change detected. Starting incremental webpack compilation...
I'm running into the exact same issue while developing my own plugin. the only solution so far was to remove ".ts" files from the webpack "resolve" option.
Hey, sorry for the delayed reply. The problem is caused by having declaration: true in tsconfig.json of the plugin. The demo-vue project is JavaScript and even if you place tsconfig.json at its root, as there are no .ts files in the demo, this tsconfig.json will not be used. As the linked plugin has .ts files, ts-loader uses the tsconfig.json from the src directory. In this tsconfig.json the declaration is set to true, so each change in .ts file produces new .d.ts files. Webpack's watcher detects these new .d.ts files and starts new compilation, which produces new .d.ts files, etc.
There are various ways to resolve this. One of them is to pass declaration: false to ts-loader and that's exactly what I've implemented in the related PR.
Another way is to pass full path to tsconfig.json (the one located in the project), but I've decided that it is not expected to have tsconfig.json in a JavaScript project, so this solution would not resolve all cases.
Environment
Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project):CLI: 5.2.0
Cross-platform modules: ~5.2.0
nativescript-vue: ~2.0.0
Android Runtime: 5.2.1
iOS Runtime: 5.2.0
Plugin(s):
Node.js: 10.13.0
Please, attach your package.json and webpack.config.js as these configurations are usually critical for investigating issues with webpack
package.json:
webpack.config.js:
tsconfig.json:
Describe the bug
When developing an plugin it is common to symlink your plugin in a test application rather than use a archived tgz file. When such symlink plugin is used inside a NativeScript + VueJs application and the "--bundle" flag is passed to
tns run
a constant rebuild if the project is triggered. The plugin that is used with symlink has a tsconfig.json file with"declaration": true
, this is critical in reproducing the issue.To Reproduce
npm run build
to build the plugin's codetns run ios --bundle
ortns run android --bundle
Expected behavior
After the above steps the demo-vue application is deployed correctly to the device/simulator
Sample project
Can be found here.
Additional context
CLI output:
The text was updated successfully, but these errors were encountered: