# File written by Decidim generator # Note: You must restart bin/webpack-dev-server for changes to take effect default: &default source_path: app/packs source_entry_path: entrypoints nested_entries: true css_extract_ignore_order_warnings: false public_root_path: public public_output_path: decidim-packs cache_path: tmp/shakapacker webpack_compile_output: true extract_css: true shakapacker_precompile: true additional_paths: - node_modules - app/packs # Reload manifest.json on all requests so we reload latest compiled packs cache_manifest: false # Select loader to use, available options are 'babel' (default), 'swc' or 'esbuild' webpack_loader: 'babel' # Set to true to enable check for matching versions of shakapacker gem and NPM package - will raise an error if there is a mismatch or wildcard versioning is used ensure_consistent_versioning: true # Select whether the compiler will use SHA digest ('digest' option) or most most recent modified timestamp ('mtime') to determine freshness compiler_strategy: digest # Select whether the compiler will always use a content hash and not just in production # Do not use contentHash except for production for performance # https://webpack.js.org/guides/build-performance/#avoid-production-specific-tooling useContentHash: false development: <<: *default compile: true compiler_strategy: mtime # Compile test packs to decidim decidim-packs folder # Reference: https://webpack.js.org/configuration/dev-server/ dev_server: https: false host: localhost # Notice that we use a different port (to prevent blocking the default one) as # there will be at least two webpack servers running port: 3035 # Hot Module Replacement updates modules while the application is running without a full reload hmr: false # mini-css-extract-plugin is a required dependency in both cases. inline_css: true client: # Should we show a full-screen overlay in the browser when there are compiler errors or warnings? overlay: false # May also be a string # webSocketURL: # hostname: "0.0.0.0" # pathname: "/ws" # port: 8080 # Should we use gzip compression? compress: true # Note that apps that do not check the host are vulnerable to DNS rebinding attacks allowed_hosts: "all" pretty: true headers: 'Access-Control-Allow-Origin': '*' static: watch: ignored: '**/node_modules/**' test: <<: *default compile: true public_output_path: packs-test production: <<: *default # Production depends on precompilation of packs prior to booting for performance. compile: false # Use content hash for naming assets. Cannot be overridden by for production. useContentHash: true # Cache manifest.json for performance cache_manifest: true