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
* Fixed Import Issues
Added --env recognition
Added scss imports to templates
Fixed fork-ts-checker-webpack-plugin not found
Fixed typescript not found
* Updated README for:
env info
npm inspect:platform info
* Add changes from rejected PR12 from mylmz10
* Fixed DefinePlugin over writing CLI 3 options
Copy file name to clipboardExpand all lines: README.md
+12-2
Original file line number
Diff line number
Diff line change
@@ -55,14 +55,24 @@ You will have several options in serving and building the project:
55
55
56
56
The basic `serve` and `build` options should be similar to what is in a CLI 3 project except the added options to dictate which kind of environment you are using: `web`, `android` or `ios`. Please note that when building web projects, they will output to `dist` and when building native projects, they will output to `platforms\android` or `platforms\ios` depending on which you are building at the time.
57
57
58
+
#### --env command line recognition
59
+
Basic support for passing the `env` command line option is in place, but has a slightly different syntax since we're working with the CLI 3 webpack infrastructure. To inject items into `env` at run-time, you will need to add `-- --env.option` Where option is one of the recognized options that Nativescript-Vue and this project supports.
60
+
An example of this would be something like this: `npm run serve:android -- --env.production`. This would allow you to serve up a Production build of your Android app versus just running `npm run serve:android` which would serve a Development version of the same.
61
+
58
62
#### Webpack related information
59
63
The options passed in at `npm run` will dictate what webpack config is provided. The first choice webpack will make is if this is a `web` or `native` environment. Then, if it's a `native` environment, it will determine choices to be made between `ios` and `android`.
60
64
61
65
Each time the project is built or served, the plugin will copy the latest webpack config from the cli to the root of your project. When you build a project, it will clean-up this file at the end, but just serving the project will not. This is an issue with [nativescript-dev-webpack](https://github.com/NativeScript/nativescript-dev-webpack) and cannot be overcome at this time.
62
66
63
67
#### Inspecting the Webpack config
64
-
If you'd like to see what the webpack config is doing then you can run the following:
65
-
`vue inspect --mode development.web > output.js` and the `output.js` file in root will show you what's going on. Subtitute `development.android` or `production.ios`, etc to see the different configs based on the environmental variables.
68
+
If you'd like to see what the webpack config is doing then you can run one of the following:
69
+
1.`npm run inspect:android`
70
+
2.`npm run inspect:ios`
71
+
3.`npm run inspect:web`
72
+
73
+
These will default to showing you the Development version of the webpack config. You can pass in the `-- --env.production` option to see the Production version of the config.
74
+
75
+
If you'd like to control this on your own and not use the provided `npm scripts` then you can do something like: `vue inspect --mode development.web > output.js` and the `output.js` file in root will show you what's going on. Subtitute `development.android` or `production.ios`, etc to see the different configs based on the environmental variables.
66
76
67
77
#### Aliases
68
78
Prebuilt in the webpack config are several aliases that you can use. Here is a table listing out the various alias and the folder they use based on the environment chosen:
0 commit comments