javascript - Webpack error : output filename not configured -
// webpack.config.js const webpack = require('webpack'); const path = require('path'); module.exports = { entry: path.join(__dirname, 'src', 'app-client.js'), output: { path: path.join(__dirname, 'src', 'static', 'js'), filename: 'bundle.js' }, module: { loaders: [{ test: path.join(__dirname, 'src'), loader: ['babel-loader'], query: { cachedirectory: 'babel_cache', presets: ['react', 'es2015'] } }] }, plugins: [ new webpack.defineplugin({ 'process.env.node_env': json.stringify(process.env.node_env) }), new webpack.optimize.dedupeplugin(), new webpack.optimize.occurenceorderplugin(), new webpack.optimize.uglifyjsplugin({ compress: { warnings: false }, mangle: true, sourcemap: false, beautify: false, dead_code: true }) ] };
i have checked filename webpack.config.js
.
file in root directory of project.
it has module.exports
.
so possibly go wrong ?
error showing output filename not configured
when running
node_env=production node_modules/.bin/webpack -p
current directory root project /myproject$
update
its solved
in case comes around . error happened because had no /js/
folder inside /src/
. looks webpack dosent creates folders. after created folder using mkdir
worked smooth.
Comments
Post a Comment