Skip to content
Snippets Groups Projects
Select Git revision
  • c7c073835c83f225627c70abc9f34d74540eccb1
  • master default protected
  • maj-readme
  • update-budget-msg-2022
  • share-with-metadata
  • explications-resultats-macros-PLF2022
  • plf_fix
  • benoit-cty-master-patch-87290
  • activate-plf-2021
  • stats
  • switch-plf
  • carto
  • adapt-matomo
  • js-to-ts
  • nbre-part-logic
  • add-nbre-part
  • 1.0.0
17 results

babel.config.js

Blame
  • user avatar
    Loïc Poullain authored
    c7c07383
    History
    babel.config.js 642 B
    function babelConfig(api) {
      api.cache(true);
    
      const presets = [
        [
          "@babel/preset-env",
          {
            targets: {
              node: 8,
            },
          },
        ],
        ["next/babel"],
      ];
    
      const plugins = [
        ["@babel/plugin-proposal-pipeline-operator", { proposal: "minimal" }],
        ["lodash"],
        [
          "module-resolver",
          {
            alias: {
              components: "./components",
              lib: "./lib",
              pages: "./pages",
              styles: "./styles",
            },
          },
        ],
        ["wrap-in-js", { extensions: ["scss$"] }],
      ];
    
      return {
        plugins,
        presets,
      };
    }
    
    module.exports = babelConfig;