package.cjs.configs.nanos.webpack.resolve.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neeto-commons-frontend Show documentation
Show all versions of neeto-commons-frontend Show documentation
A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.
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",
],
};