nickjj / manifest-revision-webpack-plugin

Write out a manifest file containing your versioned webpack chunks and assets.
ISC License
124 stars 40 forks source link

rootAssetPath does not accept absolute path. #32

Closed qria closed 7 years ago

qria commented 7 years ago

from my webpack.config.js file:

    plugins: [
        new webpack.HotModuleReplacementPlugin(),
        new ManifestRevisionPlugin(
            path.join(__dirname, 'ads', 'web', 'static', 'built', 'manifest.json'), {
            rootAssetPath: path.join(__dirname, 'ads', 'web', 'static'),
        }),
    ],

running webpack yields this error

ERROR in Entry module not found: Error: Cannot resolve 'file' or 'directory' .//Users/qria/dodo-ads/ads/web/static/css/intro.scss.css in /Users/qria/dodo-ads

ERROR in Entry module not found: Error: Cannot resolve 'file' or 'directory' .//Users/qria/dodo-ads/ads/web/static/css/intro.scss.css.map in /Users/qria/dodo-ads

ERROR in Entry module not found: Error: Cannot resolve 'file' or 'directory' .//Users/qria/dodo-ads/ads/web/static/css/style.scss.css in /Users/qria/dodo-ads

ERROR in Entry module not found: Error: Cannot resolve 'file' or 'directory' .//Users/qria/dodo-ads/ads/web/static/css/style.scss.css.map in /Users/qria/dodo-ads

ERROR in Entry module not found: Error: Cannot resolve 'file' or 'directory' .//Users/qria/dodo-ads/ads/web/static/built/bundle.f9bc1dad5d8767887b16.js in /Users/qria/dodo-ads

ERROR in Entry module not found: Error: Cannot resolve 'file' or 'directory' .//Users/qria/dodo-ads/ads/web/static/built/bundle.f9bc1dad5d8767887b16.js.map in /Users/qria/dodo-ads

ERROR in Entry module not found: Error: Cannot resolve 'file' or 'directory' .//Users/qria/dodo-ads/ads/web/static/built/manifest.json in /Users/qria/dodo-ads

(...) bunch of lines more

changing __dirname to '.' makes the error go away.

nickjj commented 7 years ago

Yeah, the readme file also mentions this. The example rootAssetPath is set to var rootAssetPath = './src/client';.