I get Module not found: Error: Can't resolve 'sdk/theme/themes/[projectName]/src/js/cypress/support/component-index.html' because i have cypress located at sdk/tests/[projectName]/. How can i fix this problem without changing my project structure?
for better understanding, this is my project structure and content of my webpack.config file is:
const path = require('path');
const srcPath = path.resolve(__dirname + '/src/js')
module.exports = {
context: srcPath,
mode: 'production',
watch: false,
entry: {
main: srcPath + '/styleguide/index.js'
},
output: {
filename: 'styleguide-webpack.js'
},
devtool: 'cheap-module-eval-source-map',
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env']
}
}
}
]
},
plugins: []
I have also tried to put another webpack.config.js file in cypress directory, to fix a problem but the problem persists. Here is content of that file:
module.exports = {
entry: {
cypress : "./",
babel: "./../../theme/themes/[projectName]/webpack.config.babel"
},
output: {
path: './dist',
filename: 'bundle.js'
}
};
Hope anyone can help c:
I've been trying anything i can find online, on forums or anywhere else, but i just cannot find a solution or help.