Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

shakapacker

Package Overview
Dependencies
Maintainers
0
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shakapacker

Use webpack to manage app-like JavaScript modules in Rails

  • 8.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
127K
decreased by-16.71%
Maintainers
0
Weekly downloads
 
Created

What is shakapacker?

Shakapacker is a modern JavaScript and asset bundler for Ruby on Rails applications. It leverages Webpack to manage and compile JavaScript, CSS, and other assets, making it easier to integrate modern front-end tools and frameworks into Rails projects.

What are shakapacker's main functionalities?

JavaScript Bundling

Shakapacker allows you to bundle JavaScript files using Webpack. The code sample demonstrates a basic Webpack configuration for bundling JavaScript files in a Rails application.

module.exports = {
  entry: './app/javascript/packs/application.js',
  output: {
    filename: 'bundle.js',
    path: path.resolve(__dirname, 'public/packs')
  }
};

CSS and Asset Management

Shakapacker can manage CSS and other assets like images. The code sample shows how to configure Webpack to handle CSS files and image assets using appropriate loaders.

module.exports = {
  module: {
    rules: [
      {
        test: /\.css$/,
        use: ['style-loader', 'css-loader']
      },
      {
        test: /\.(png|svg|jpg|gif)$/,
        use: ['file-loader']
      }
    ]
  }
};

Hot Module Replacement (HMR)

Shakapacker supports Hot Module Replacement (HMR) for a better development experience. The code sample configures Webpack's dev server to enable HMR, allowing modules to be updated in the browser without a full reload.

module.exports = {
  devServer: {
    contentBase: path.join(__dirname, 'public'),
    hot: true
  }
};

Other packages similar to shakapacker

FAQs

Package last updated on 29 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc