Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Examples] iframe sourcemaps #5373

Merged
merged 2 commits into from
Jun 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 7 additions & 5 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ Ensure you have Node.js installed. Then, install all of the required Node.js dep
```
npm install
```
Now run the following two commands in two separate terminals:
Now run the following command:
```
npm run watch
npm run develop
```
and
Visit the url mentioned in your terminal to view the examples browser.

You can also run the examples browser with a specific version of the engine by running the following command:
```
npm run serve
ENGINE_PATH=../build/playcanvas.mjs/index.js npm run develop
```
Visit [http://localhost:5000]() to view the examples browser.
Where `../build/playcanvas.mjs/index.js` is the path to the es6 version of the engine.

To create the side bar thumbnails run the following script:
```
Expand Down
2 changes: 1 addition & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"watch": "npm run build:example:data && npm run build:directory && cross-env concurrently --kill-others \"npm run rollup:watch\"",
"watch:debug": "ENGINE_PATH=../build/playcanvas.dbg.js npm run watch",
"watch:profiler": "ENGINE_PATH=../build/playcanvas.prf.js npm run watch",
"develop": "cross-env concurrently --kill-others \"npm run watch:debug\" \"npm run serve\""
"develop": "cross-env concurrently --kill-others \"npm run watch\" \"npm run serve\""
},
"eslintConfig": {
"root": true,
Expand Down
3 changes: 2 additions & 1 deletion examples/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ const builds = [
output: {
name: 'bundle',
format: 'umd',
dir: 'dist/iframe'
dir: 'dist/iframe',
sourcemap: process.env.NODE_ENV === 'development' ? 'inline' : false,
},
plugins: [
alias({
Expand Down
2 changes: 1 addition & 1 deletion examples/src/iframe/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import '../../lib/objectValuesPolyfill.js';
import * as observer from '@playcanvas/observer';
import * as pcui from '@playcanvas/pcui/react';
import React from 'react';
import pc from '../../../build/playcanvas.js';
import * as pc from '../../../build/playcanvas.js';
import * as pcx from '../../../build/playcanvas-extras.mjs/index.js';

window.observer = observer;
Expand Down