Rocketact

Rocketact

  • Docs
  • GitHub

›Development

Getting Started

  • Getting Started
  • Folder Structure
  • Available Scripts
  • Supported Browsers and Features
  • Custom Templates

Development

  • Managing Dependencies
  • Adding Pages
  • Adding Stylesheets
  • Post-Processing CSS
  • Adding Images
  • Http proxy

Deployment

  • Public Path

Plugins

  • What is the plugin?
  • rocketact-plugin-polyfill
  • rocketact-plugin-bundle-analyzer
  • Plugin template
  • Awesome Plugins
Edit

Http proxy

How to use devServer.proxy in Rocketact?

The reference mode of custom proxy configuration is similar to that of custom plugin. You can create one in the root folder of the projectrocketactProxy.jsFile, which exports objects that act directly ondevServer.proxyConfiguration, which fully followsdevServer.proxyThe content can be in the following format:

module.exports = {
  "/api": {
    target: "http://localhost:3000",
    changeOrigin: true,
  },
};

And then through the package.json Add a new configuration "rocketactproxy" and tell rocketact to load the file:

 "rocketactProxy": "./rocketactProxy.js"
← Adding ImagesPublic Path →
  • How to use devServer.proxy in Rocketact?
Rocketact
Docs
Getting Started
Community
User ShowcaseIssues
More
GitHubStar
Copyright © 2018-present Rocketact documentation authors.