chore: add mode and build script

This commit is contained in:
Igor Randjelovic
2020-11-17 15:28:32 +01:00
parent bea55474df
commit 1e7efd6e52
5 changed files with 14 additions and 3 deletions

View File

@ -1 +1,2 @@
#
#
dist

View File

@ -2,6 +2,7 @@
exports[`vue configuration for android 1`] = `
"{
mode: 'development',
resolve: {
symlinks: true,
alias: {
@ -137,6 +138,7 @@ exports[`vue configuration for android 1`] = `
exports[`vue configuration for ios 1`] = `
"{
mode: 'development',
resolve: {
symlinks: true,
alias: {

View File

@ -5,7 +5,7 @@
"main": "index.js",
"license": "Apache-2.0",
"scripts": {
"build": "echo todo",
"build": "tsc",
"test": "jest"
},
"devDependencies": {

View File

@ -10,6 +10,13 @@ export default function (env: IWebpackEnv): Config {
const config = new Config();
const distPath = getDistPath(env);
const platform = determinePlatformFromEnv(env);
const mode = env.production ? 'production' : 'development';
// set mode
config.mode(mode);
// todo: devtool
// config.devtool()
// look for loaders in
// - @nativescript/webpack/loaders

View File

@ -2,8 +2,9 @@
"compilerOptions": {
"rootDir": ".",
"baseUrl": ".",
"target": "es2015",
"target": "es2017",
"module": "commonjs",
"outDir": "./dist",
"declaration": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,