Я работаю над своим проектом, используя Vuejs
и Laravel Mix для компиляции ресурсов, поэтому моя проблема в том, что когда компиляция завершилась и сгенерирован файл mix-manifest.json
в publi c dir, моя index.html
доза файла не при проверке страницы проанализируйте содержимое mix('/build/app.js')
, поэтому мой вопрос, как мне решить мою проблему?
mix-manifest. json
{
"/build/js/app.js": "/build/js/app.js?id=4a7eeea4af6b4629869b",
"/build/css/style.css": "/build/css/style.css?id=f0be2e3e94cb87f64900",
"/build/css/now-ui-dashboard.css": "/build/css/now-ui-dashboard.css?id=2da4af6c26e7da275636",
"/build/css/flaticon.css": "/build/css/flaticon.css?id=42ec5f5d2a9d0c838fcf",
"/build/css/all.css": "/build/css/all.css?id=07ee5ffdbec2760200b3"
}
index. html
<body >
<noscript>
<strong>We're sorry but full-hunt doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
<!-- js file -->
<script type="text/javascript" src="{{ mix('/build/js/app.js') }}"></script>
</body>
webpack.mix. js
var webpack = require("webpack");
var WebpackLaravelMixManifest = require("webpack-laravel-mix-manifest");
mix.webpackConfig({
plugins: [
new webpack.ProvidePlugin({
$: require.resolve('jquery'),
jQuery: require.resolve('jquery'),
Popper: 'popper.js/dist/umd/popper.js'
}),
// Write out 「mix-manifest.json」 to build directory.
new WebpackLaravelMixManifest()
],
});
mix.js([
'src/assets/js/jquery-3.2.1.min.js',
'src/assets/js/plugins/bootstrap-notify.js',
'src/assets/js/plugins/chartjs.min.js',
'src/assets/js/plugins/perfect-scrollbar.jquery.min.js',
'src/assets/js/bootstrap.min.js',
'src/assets/js/custom-2.js',
'src/assets/js/custom.js',
// 'src/assets/js/now-ui-dashboard.js',
// 'src/assets/js/now-ui-dashboard.min.js',
'src/assets/js/popper.min.js',
'src/assets/js/utils.js',
], 'public/build/js/app.js').version()
.sass('src/assets/css/sass/style.scss', 'public/build/css/style.css').version()
.sass('src/assets/css/sass/now-ui-dashboard.scss', 'public/build/css/now-ui-dashboard.css').version()
.sass('src/assets/fonts/flat-icon/_flaticon.scss', 'public/build/css/flaticon.css').version()
.styles([
'src/assets/css/bootstrap.min.css',
'src/assets/css/now-ui-dashboard.css',
'src/assets/css/now-ui-dashboard.css.map',
'src/assets/css/style.css',
'src/assets/css/style.css.map',
// Fonts
'src/assets/fonts/flat-icon/flaticon.css',
'src/assets/fonts/font-awesome/css/font-awesome.css',
'src/assets/fonts/font-awesome/css/font-awesome.min.css.css',
], 'public/build/css/all.css').version()
.copyDirectory('src/assets/fonts/font-awesome/fonts/', 'public/build/fonts')
.setPublicPath('public');