@netless/appliance-plugin 1.0.0-beta.2 → 1.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -57,7 +57,7 @@ import { WindowManager } from "@netless/window-manager";
57
57
  // All bundled
58
58
  import { ApplianceMultiPlugin } from '@netless/appliance-plugin';
59
59
  // cdn
60
- // The following steps are optional. If you use a cdn, you don't need to import it from dist
60
+ // The following steps are optional. If you use cdn, you do not need to import from dist. If you import from dist, you need to import resources and configure them to options.cdn in bolb inline form. Such as? raw, this requires packaging support,vite default support? raw,webpack needs to be configured.
61
61
  import fullWorkerString from '@netless/appliance-plugin/dist/fullWorker.js?raw';
62
62
  import subWorkerString from '@netless/appliance-plugin/dist/subWorker.js?raw';
63
63
  const fullWorkerBlob = new Blob([fullWorkerString], {type: 'text/javascript'});
@@ -91,7 +91,7 @@ await ApplianceMultiPlugin.getInstance(manager,
91
91
  import { WhiteWebSdk } from "white-web-sdk";
92
92
  // All bundled
93
93
  import { ApplianceSinglePlugin, ApplianceSigleWrapper } from '@netless/appliance-plugin';
94
- // The following steps are optional. If you use a cdn, you don't need to import it from dist
94
+ // The following steps are optional. If you use cdn, you do not need to import from dist. If you import from dist, you need to import resources and configure them to options.cdn in bolb inline form. Such as? raw, this requires packaging support,vite default support? raw,webpack needs to be configured.
95
95
  import fullWorkerString from '@netless/appliance-plugin/dist/fullWorker.js?raw';
96
96
  import subWorkerString from '@netless/appliance-plugin/dist/subWorker.js?raw';
97
97
  const fullWorkerBlob = new Blob([fullWorkerString], {type: 'text/javascript'});
@@ -115,6 +115,23 @@ await ApplianceSinglePlugin.getInstance(room,
115
115
  }
116
116
  }
117
117
  );
118
+ ```
119
+ #### About ’?raw‘ webpack configuration
120
+ ```js
121
+ module: {
122
+ rules: [
123
+ // ...
124
+ {
125
+ test: /\.m?js$/,
126
+ resourceQuery: { not: [/raw/] },
127
+ use: [ ... ]
128
+ },
129
+ {
130
+ resourceQuery: /raw/,
131
+ type: 'asset/source',
132
+ }
133
+ ]
134
+ },
118
135
  ```
119
136
 
120
137
  ### Call introduction