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

Cannot GET / without 'public' folder created #97

Open
mingtao13595 opened this issue Aug 31, 2023 · 2 comments
Open

Cannot GET / without 'public' folder created #97

mingtao13595 opened this issue Aug 31, 2023 · 2 comments

Comments

@mingtao13595
Copy link

Thanks for this great job.
Sorry for that easy question which shows Cannot GET / for all the demo applications.
I noticed that dist folder can be created by yarn analyze or yarn build how ever no methods was correlated to the public folder?
Is it means public folder not neccesary in this project?
Also, no command like npx create-react-app my-app was found in each package.json.
Here attached the output of yarn develop :

yarn run v1.22.19
$ webpack serve --hot --server-type https --port 8080 --config webpack.develop.js
<i> [webpack-dev-server] SSL certificate: /home/wang/looker-dev/extension-examples/react/javascript/helloworld-js/node_modules/.cache/webpack-dev-server/server.pem
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: https://localhost:8080/, https://127.0.0.1:8080/
<i> [webpack-dev-server] Content not from webpack is served from '/home/wang/looker-dev/extension-examples/react/javascript/helloworld-js/public' directory
Browserslist: caniuse-lite is outdated. Please run:
  npx browserslist@latest --update-db
  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
asset bundle.js 3.82 MiB [emitted] (name: app) 1 related asset
orphan modules 3.08 MiB [orphan] 868 modules
runtime modules 26.3 KiB 13 modules
cacheable modules 3.18 MiB
  modules by path ../../../node_modules/ 3.17 MiB 661 modules
  modules by path ./src/*.js 6.15 KiB
    ./src/index.js 1.63 KiB [built] [code generated]
    ./src/App.js 1.73 KiB [built] [code generated]
    ./src/HelloWorld.js 2.78 KiB [built] [code generated]
webpack 5.69.1 compiled successfully in 5921 ms
@jithinolickal
Copy link

You can try https://localhost:8080/bundle.js to see the bundle file. Use this url in the manifest.lkml while developing your app.
Have a read through this docs.

@bryans99
Copy link
Contributor

The public folder is not necessary for extensions. The Looker extension framework constructs the html to load the extension at runtime and all it needs is the javascript. In development mode the manifest points to the development server dist folder. In production mode you copy the transpiled javascript into the LookML project.

There is a create-looker-extension package but unfortunately its a little out of date. Hopefully it will be updated soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants