From 76c51d4e94af45fe0cf8da2e3d053613e5ea42fc Mon Sep 17 00:00:00 2001 From: Manuel Bouza Date: Wed, 6 Feb 2019 11:10:23 +0100 Subject: [PATCH] Move module resolution config to webpack --- .babelrc | 13 +------------ webpack.config.js | 6 ++++++ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.babelrc b/.babelrc index a51ab33..d63fe0c 100644 --- a/.babelrc +++ b/.babelrc @@ -2,17 +2,6 @@ "presets": ["@babel/preset-env", "@babel/preset-react"], "plugins": [ ["@babel/plugin-proposal-decorators", { "legacy": true }], - ["@babel/plugin-proposal-class-properties", { "loose": true }], - [ - "module-resolver", - { - "root": [ - "./src/js" - ], - "alias": { - "images": "./src/images" - } - } - ] + ["@babel/plugin-proposal-class-properties", { "loose": true }] ] } diff --git a/webpack.config.js b/webpack.config.js index 9e55c20..8380f77 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -75,6 +75,12 @@ module.exports = { chunks: ["options"] }) ], + resolve: { + modules: [path.join(__dirname, "src/js"), "node_modules"], + alias: { + images: path.join(__dirname, 'src/images') + } + }, // webpack creates sourcemaps by default and evals js code // this is not allowed by chrome extensions // https://stackoverflow.com/a/49100966