All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.configs.nanos.webpack.resolve.js Maven / Gradle / Ivy

Go to download

A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.

There is a newer version: 4.12.3
Show newest version
const fs = require("fs");
const path = require("path");

const isCommonsFrontend = !__dirname.includes("node_modules");

const absolutePath = basePath =>
  isCommonsFrontend
    ? path.join(__dirname, "../../../", basePath)
    : path.join(__dirname, "../../../../../../", basePath);

const srcPath = fs.existsSync(absolutePath("src"))
  ? absolutePath("src")
  : absolutePath("app/javascript/src");

module.exports = {
  alias: {
    apis: `${srcPath}/apis`,
    assets: `${srcPath}/assets`,
    components: `${srcPath}/components`,
    hooks: `${srcPath}/hooks`,
    reducers: `${srcPath}/reducers`,
    routes: `${srcPath}/routes`,
    stores: `${srcPath}/stores`,
    translations: `${srcPath}/translations`,
    utils: `${srcPath}/utils`,
    src: srcPath,
    neetoui: "@bigbinary/neetoui",
    neetocommons: "@bigbinary/neeto-commons-frontend",
    neetoicons: "@bigbinary/neeto-icons",
    neetoteam: "@bigbinary/neeto-team-members-frontend",
    neetoeditor: "@bigbinary/neeto-editor",
    neetofilters: "@bigbinary/neeto-filters-frontend",
    neetomolecules: "@bigbinary/neeto-molecules",
    neetocist: "@bigbinary/neeto-cist",
    neetohotkeys: "@bigbinary/neeto-hotkeys",
  },
  extensions: [
    ".ts",
    ".mjs",
    ".js",
    ".jsx",
    ".sass",
    ".scss",
    ".css",
    ".module.sass",
    ".module.scss",
    ".module.css",
    ".png",
    ".svg",
    ".gif",
    ".jpeg",
    ".jpg",
  ],
};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy