Move module resolution config to webpack
This commit is contained in:
13
.babelrc
13
.babelrc
@@ -2,17 +2,6 @@
|
|||||||
"presets": ["@babel/preset-env", "@babel/preset-react"],
|
"presets": ["@babel/preset-env", "@babel/preset-react"],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
["@babel/plugin-proposal-decorators", { "legacy": true }],
|
["@babel/plugin-proposal-decorators", { "legacy": true }],
|
||||||
["@babel/plugin-proposal-class-properties", { "loose": true }],
|
["@babel/plugin-proposal-class-properties", { "loose": true }]
|
||||||
[
|
|
||||||
"module-resolver",
|
|
||||||
{
|
|
||||||
"root": [
|
|
||||||
"./src/js"
|
|
||||||
],
|
|
||||||
"alias": {
|
|
||||||
"images": "./src/images"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,12 @@ module.exports = {
|
|||||||
chunks: ["options"]
|
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
|
// webpack creates sourcemaps by default and evals js code
|
||||||
// this is not allowed by chrome extensions
|
// this is not allowed by chrome extensions
|
||||||
// https://stackoverflow.com/a/49100966
|
// https://stackoverflow.com/a/49100966
|
||||||
|
|||||||
Reference in New Issue
Block a user