mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(webpack5): initial project files
This commit is contained in:
8
packages/webpack5/src/configuration/angular.ts
Normal file
8
packages/webpack5/src/configuration/angular.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import base from './base';
|
||||
|
||||
// todo: add base configuration for angular
|
||||
export default function (env) {
|
||||
const config = base(env);
|
||||
|
||||
return {};
|
||||
}
|
||||
6
packages/webpack5/src/configuration/base.ts
Normal file
6
packages/webpack5/src/configuration/base.ts
Normal 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 {};
|
||||
}
|
||||
7
packages/webpack5/src/configuration/index.ts
Normal file
7
packages/webpack5/src/configuration/index.ts
Normal 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';
|
||||
8
packages/webpack5/src/configuration/javascript.ts
Normal file
8
packages/webpack5/src/configuration/javascript.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import base from './base';
|
||||
|
||||
// todo: add base configuration for core
|
||||
export default function (env) {
|
||||
const config = base(env);
|
||||
|
||||
return {};
|
||||
}
|
||||
8
packages/webpack5/src/configuration/react.ts
Normal file
8
packages/webpack5/src/configuration/react.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import base from './base';
|
||||
|
||||
// todo: add base configuration for react
|
||||
export default function (env) {
|
||||
const config = base(env);
|
||||
|
||||
return {};
|
||||
}
|
||||
8
packages/webpack5/src/configuration/svelte.ts
Normal file
8
packages/webpack5/src/configuration/svelte.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import base from './base';
|
||||
|
||||
// todo: add base configuration for svelte
|
||||
export default function (env) {
|
||||
const config = base(env);
|
||||
|
||||
return {};
|
||||
}
|
||||
8
packages/webpack5/src/configuration/typescript.ts
Normal file
8
packages/webpack5/src/configuration/typescript.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import base from './base';
|
||||
|
||||
// todo: add base configuration for core
|
||||
export default function (env) {
|
||||
const config = base(env);
|
||||
|
||||
return {};
|
||||
}
|
||||
15
packages/webpack5/src/configuration/vue.ts
Normal file
15
packages/webpack5/src/configuration/vue.ts
Normal 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 {};
|
||||
}
|
||||
1
packages/webpack5/src/index.ts
Normal file
1
packages/webpack5/src/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './configuration';
|
||||
1
packages/webpack5/src/loaders/css2json-loader/index.ts
Normal file
1
packages/webpack5/src/loaders/css2json-loader/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
//
|
||||
1
packages/webpack5/src/transformers/AngularHMR/index.ts
Normal file
1
packages/webpack5/src/transformers/AngularHMR/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
// todo
|
||||
1
packages/webpack5/src/transformers/NativeClass/index.ts
Normal file
1
packages/webpack5/src/transformers/NativeClass/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
// todo
|
||||
Reference in New Issue
Block a user