How to use plugins

I am following the instructions to import uppy into my current system. However, after npm install @uppy/core @uppy/xhr-upload @uppy/dashboard, I don’t know where to import those plugins. i.e. I don’t know where to use those following code:

Can anyone help me out? Thanks, currently my system uses webpack as module bundler.

// Import the plugins
const Uppy = require('@uppy/core')
const XHRUpload = require('@uppy/xhr-upload')
const Dashboard = require('@uppy/dashboard')

// And their styles (for UI plugins)
require('@uppy/core/dist/style.css')
require('@uppy/dashboard/dist/style.css')

const uppy = Uppy()
  .use(Dashboard, {
    trigger: '#select-files'
  })
  .use(XHRUpload, { endpoint: 'https://api2.transloadit.com' })

uppy.on('complete', (result) => {
  console.log('Upload complete! We’ve uploaded these files:', result.successful)
})```

Hi! If you are using Webpack, you should add this code you posted to an entry point of your app, like index.js. Then make sure there’s a <button id="select-files"> in your HTML, and a <script> tag at the bottom of the page pointing to the resulting bundle that Webpack generates.