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

How to load Bootstrap? #22

Open
Jakobud opened this issue Feb 5, 2020 · 1 comment
Open

How to load Bootstrap? #22

Jakobud opened this issue Feb 5, 2020 · 1 comment

Comments

@Jakobud
Copy link

Jakobud commented Feb 5, 2020

I'm having a hard time figuring out how to add Bootstrap to this. I tried just adding Bootstrap and jQuery via npm install bootstrap jquery and then doing import "bootstrap" in webview.js but that was causing all sorts of build errors.

Next I tried just manually adding the files to the resources folder:

resources/js/jquery.js
resources/js/popper.js
resources/js/bootstrap.js

I ensure that I add them to my resources array in package.json, but then I get the build error:

error Error while building resources/js/bootstrap.js
./resources/js/bootstrap.js
Module not found: Error: Can't resolve 'popper.js' in '/Users/jwilson/repos/sketch/font-auditor/resources/js'
resolve 'popper.js' in '/Users/jwilson/repos/sketch/font-auditor/resources/js'
  Parsed request is a module
  using description file: /Users/jwilson/repos/sketch/font-auditor/package.json (relative path: ./resources/js)
    Field 'sketch' doesn't contain a valid alias configuration
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
.... (about 100 more lines of stuff trace code)

Is there a simple example on how to add it?

@lizheming
Copy link

maybe skpm/sketch-module-web-view#154 it can help you~

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

2 participants