question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a hasCORS boolean property to the Exchange Structure /// Webpack throws error when building in Nuxt

See original GitHub issue

I think it would be great to have a hasCORS boolean property in the Exchange Structure. So we would only need to define a proxy on the client side if it is really needed.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:36 (23 by maintainers)

github_iconTop GitHub Comments

3reactions
xplcommented, Sep 23, 2017

@kireerik @cklester So here’s the solution. Add the following to your config/nuxt.js file:

module.exports = {

  build: {
      extend (config, { dev, isClient }) {
        
        if (isClient) {

          config.module.rules.push ({
              test: /node_modules\/ccxt\/(.+)\.js$/,
              loader: "babel-loader",
              options: {
                babelrc: false,
                cacheDirectory: false,
                presets: ["es2015"],
                plugins: ["syntax-async-functions", "transform-regenerator"]
              }
          })
        }
      }
  },

This will add CCXT to the Babel transpilation stage. Seems that it could be a common problem across various frameworks. So if you’re not the only ones who are having this problem, we will reconsider adding the Babel transpilation stage to the CCXT itself.

Hope this helps.

2reactions
cklestercommented, Sep 22, 2017

I’ve granted access for @xpl to the example repo.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The build Property - Nuxt
Nuxt use webpack-bundle-analyzer to let you visualize your bundles and how to optimize them. Type: Boolean or Object; Default: false.
Read more >
Getting errors adding Buefy to Nuxt - Stack Overflow
Run npm i nuxt-buefy; Add 'nuxt-buefy' to modules in nuxt.config.js. I then run the dev server via
Read more >
nuxt-build-optimisations - npm
Nuxt.js is fast but is limited by its webpack build, when your app grows things slow down. Nuxt build optimisations abstracts the complexities ......
Read more >
Nuxt.js for Busy Developers - CODE Magazine
js takes advantage of the Vue.js server-side rendering capabilities and enables you to build a server-side rendering app in no time. What's ...
Read more >
Guide | Electron-nuxt - GitHub Pages
If you don't want to use Webpack assets from the assets directory read section static resources and resolving paths in HTML. # Routing....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found