Expected Behavior
Expect to modify the publicPath configuration in webpack to not be set to “auto”. For example, setting it to “/scratchnew” should correctly load the “fetch-worker” file, enabling the addition of roles img to load properly onto the stage.
Steps to Reproduce
Expect ur : http://localhost:8601/scratchnew/
- file: packages/scratch-gui/webpack.config.js
output: {
publicPath: '/scratchnew/',
path: path.resolve(__dirname, 'dist')
}
-
view NetWork find http://localhost:8601/chunks/fetch-worker.xxxx.js is not right, but http://localhost:8601/scratchnew/gui.js is ok
-
when Select Sprite but roles image is not load onto stage。 packages/scratch-gui/src/containers/target-pane.jsx==> this.props.vm.setEditingTarget(id)) is ok。
packages/scratch-vm/src/virtual-machine.js ==> installTargets is ok.
packages/scratch-vm/src/serialization/sb3.js is ok,
but packages/scratch-storage is not work.
-
When I use Nginx to forward requests to http://localhost:8601/chunks/fetch-worker.xxxx.js, it works fine. The roles img to can loaded onto the stage.
-
Is it possible that the fetch-worker file cannot be modified by the webpack tool to change its access path?
No matter how I adjust the packaging location of ‘scratch-storage/dist/web’. Even after adjusting assetModuleFilename: 'static/assets/[name].[hash][ext][query], assetHost: window.location.origin + "/scratchnew, and other methods, fetch-worker.js within scratch-storage still fails to load and function correctly. Does scratch-storage have specific requirements for loading fetch-worker?
-
I was hoping to modify the publicPath to handle subdomains, avoiding direct access from the root /. Do you have any other good solutions? If so, please let me know. Thank you very much.
Thank you very much.
Expected Behavior
Expect to modify the publicPath configuration in webpack to not be set to “auto”. For example, setting it to “/scratchnew” should correctly load the “fetch-worker” file, enabling the addition of roles img to load properly onto the stage.
Steps to Reproduce
Expect ur : http://localhost:8601/scratchnew/
view NetWork find
http://localhost:8601/chunks/fetch-worker.xxxx.jsis not right, buthttp://localhost:8601/scratchnew/gui.jsis okwhen Select Sprite but roles image is not load onto stage。
packages/scratch-gui/src/containers/target-pane.jsx==> this.props.vm.setEditingTarget(id))is ok。packages/scratch-vm/src/virtual-machine.js ==> installTargetsis ok.packages/scratch-vm/src/serialization/sb3.jsis ok,but
packages/scratch-storageis not work.When I use Nginx to forward requests to http://localhost:8601/chunks/fetch-worker.xxxx.js, it works fine. The roles img to can loaded onto the stage.
Is it possible that the fetch-worker file cannot be modified by the webpack tool to change its access path?
No matter how I adjust the packaging location of ‘scratch-storage/dist/web’. Even after adjusting
assetModuleFilename: 'static/assets/[name].[hash][ext][query],assetHost: window.location.origin + "/scratchnew, and other methods,fetch-worker.jswithinscratch-storagestill fails to load and function correctly. Doesscratch-storagehave specific requirements for loadingfetch-worker?I was hoping to modify the
publicPathto handle subdomains, avoiding direct access from the root/. Do you have any other good solutions? If so, please let me know. Thank you very much.Thank you very much.