Transpiling And Linting Files Outside Of My Root Directory Webpack 4
I'm developing a module that processes files from outside its root directory, so, for example, if I have the following folder structure: Frontend -> src -> chunks -> js -&
Solution 1:
Solved this by resolving loaders with require.resolve
instead of calling them as strings.
In example in my webpack config instead of
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env']
}
I did:
loader: require.resolve('babel-loader'),
options: {
presets: [require.resolve('@babel/preset-env')]
}
Followed the same pattern for all the others loaders and this solved my issue.
Post a Comment for "Transpiling And Linting Files Outside Of My Root Directory Webpack 4"