Skip to content

How to load Bootstrap? #22

@Jakobud

Description

@Jakobud

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions