I have a subdirectory subdir
with this file:
// subdir/local.js
document.body.textContent = 'hello from subdir/local.js'
and local webpack.config.js
:
// subdir/webpack.config.js const { createConfig, entryPoint, setOutput } = require('@webpack-blocks/webpack') const devServer = require('@webpack-blocks/dev-server') module.exports = createConfig([ entryPoint('.'), setOutput('./bundle.js'), devServer(), ])
The same config works in the root directory. However, running locally
webpack local.js
leads to the error:
ERROR in multi main Module not found: Error: Cannot resolve 'file' or 'directory' . in /Users/dmitrizaitsev/Dropbox/Sandbox/webpack-blocks-test/subdir @ multi main
How can I fix that error and run webpack with projects in subdirectories?