feat(webpack5): initial project files

This commit is contained in:
Igor Randjelovic
2020-11-14 12:07:56 +01:00
committed by Nathan Walker
parent 13a525ddd9
commit 9f436695ad
19 changed files with 144 additions and 4 deletions

1
packages/webpack5/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
#

View File

@ -0,0 +1,13 @@
{
"name": "@nativescript/webpack",
"version": "4.0.0-dev",
"private": true,
"main": "index.js",
"license": "Apache-2.0",
"scripts": {
"build": "echo todo"
},
"devDependencies": {
"webpack": "^5.4.0"
}
}

View File

@ -0,0 +1,8 @@
import base from './base';
// todo: add base configuration for angular
export default function (env) {
const config = base(env);
return {};
}

View File

@ -0,0 +1,6 @@
import { Configuration } from 'webpack';
// todo: add base configuration that's shared across all flavors
export default function (env): Configuration {
return {};
}

View File

@ -0,0 +1,7 @@
export { default as angularConfig } from './angular';
export { default as baseConfig } from './base';
export { default as javascriptConfig } from './javascript';
export { default as reactConfig } from './react';
export { default as svelteConfig } from './svelte';
export { default as typescriptConfig } from './typescript';
export { default as vueConfig } from './vue';

View File

@ -0,0 +1,8 @@
import base from './base';
// todo: add base configuration for core
export default function (env) {
const config = base(env);
return {};
}

View File

@ -0,0 +1,8 @@
import base from './base';
// todo: add base configuration for react
export default function (env) {
const config = base(env);
return {};
}

View File

@ -0,0 +1,8 @@
import base from './base';
// todo: add base configuration for svelte
export default function (env) {
const config = base(env);
return {};
}

View File

@ -0,0 +1,8 @@
import base from './base';
// todo: add base configuration for core
export default function (env) {
const config = base(env);
return {};
}

View File

@ -0,0 +1,15 @@
import base from './base';
// todo: add base configuration for vue
export default function (env) {
const config = base(env);
// todo: we may want to use webpack-chain internally
// to avoid "trying to read property x of undefined" type of issues
config.module.rules.push({
test: /.vue$/,
use: [],
});
return {};
}

View File

@ -0,0 +1 @@
export * from './configuration';

View File

@ -0,0 +1 @@
//

View File

@ -0,0 +1 @@
// todo

View File

@ -0,0 +1 @@
// todo

View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"rootDir": ".",
"baseUrl": ".",
"target": "es2015",
"module": "commonjs",
"declaration": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [ "es2017" ],
"sourceMap": true,
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"diagnostics": true
},
"exclude": [
"node_modules",
]
}