Tryig to fix webpack for Svelte
This commit is contained in:
parent
9bc79c3ed3
commit
62cc1f73ca
0
front/src/Components/Menu/MenuIcon.svelte
Normal file
0
front/src/Components/Menu/MenuIcon.svelte
Normal file
22
front/src/WebRtc/Stores/RequestedConstraintsStore.ts
Normal file
22
front/src/WebRtc/Stores/RequestedConstraintsStore.ts
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import { derived, writable, Writable } from "svelte/store";
|
||||||
|
|
||||||
|
class RequestedConstraintsStore {
|
||||||
|
constructor(
|
||||||
|
public camera: Writable<boolean> = writable(false),
|
||||||
|
public microphone: Writable<boolean> = writable(false),
|
||||||
|
) { }
|
||||||
|
|
||||||
|
get fullname() {
|
||||||
|
// Use derived to access writable values and export as readonly
|
||||||
|
return derived(
|
||||||
|
[this.camera, this.microphone],
|
||||||
|
([$camera, $microphone]) => {
|
||||||
|
console.log("cam or mic", $camera || $microphone)
|
||||||
|
return $camera || $microphone;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Export a singleton
|
||||||
|
export const myFormStore = new MyFormStore();
|
@ -44,7 +44,7 @@ module.exports = {
|
|||||||
use: [MiniCssExtractPlugin.loader, 'css-loader?url=false', 'sass-loader'],
|
use: [MiniCssExtractPlugin.loader, 'css-loader?url=false', 'sass-loader'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.svelte$/,
|
test: /\.(html|svelte)$/,
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
use: {
|
use: {
|
||||||
loader: 'svelte-loader',
|
loader: 'svelte-loader',
|
||||||
@ -85,12 +85,11 @@ module.exports = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
/*alias: {
|
alias: {
|
||||||
// Note: Later in this config file, we'll automatically add paths from `tsconfig.compilerOptions.paths`
|
|
||||||
svelte: path.resolve('node_modules', 'svelte')
|
svelte: path.resolve('node_modules', 'svelte')
|
||||||
},*/
|
},
|
||||||
extensions: [ '.tsx', '.ts', '.js', '.svelte' ],
|
extensions: [ '.tsx', '.ts', '.js', '.svelte' ],
|
||||||
//mainFields: ['svelte', 'browser', 'module', 'main']
|
mainFields: ['svelte', 'browser', 'module', 'main']
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
filename: (pathData) => {
|
filename: (pathData) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user