You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi friends, I'm compiling JS, TS and SCSS in Laravel 10. Since some point the compilation mix watch initialization goes extremely slow. The initial compilation of the code takes more than 5 minutes. It gets stuck at 10%
building (10%) 0/3 entries 1/3 dependencies 0/1 modules 1 active
babel-loader ' ts-loader ' resources\src\js\app.ts and at 92%
Can you advise me if this problem is in some JS package or in the code that slows down the compiler.
Thank you for your suggestions.
First off: this propject is nearly dead so o not expect quick answer.
Second: main "contributor" is @JeffreyWay (creator of laracasts) and you know the "quality" of laracasts. Same quality here.
Third: use code-block to wrap code. Greatly improves readibility.
npm list --depth=0
)node -v
): v20.15.0npm -v
): 10.7.0Hi friends, I'm compiling JS, TS and SCSS in Laravel 10. Since some point the compilation mix watch initialization goes extremely slow. The initial compilation of the code takes more than 5 minutes. It gets stuck at 10%
building (10%) 0/3 entries 1/3 dependencies 0/1 modules 1 active
babel-loader ' ts-loader ' resources\src\js\app.ts and at 92%
Can you advise me if this problem is in some JS package or in the code that slows down the compiler.
Thank you for your suggestions.
My webpack.mix.js:
const mix = require('laravel-mix');
const webpack = require('webpack');
const glob = require('glob');
const path = require('path');
const { VueLoaderPlugin } = require('vue-loader');
const mode = process.argv.indexOf("production") !== -1 ? "production" : "development";
console.log(
Webpack mode: ${mode}
);console.log(
Webpack not in production:
+ !mix.inProduction());let plugins = [
new VueLoaderPlugin(),
new webpack.DefinePlugin({
VUE_OPTIONS_API: true,
VUE_PROD_DEVTOOLS: false,
VUE_PROD_HYDRATION_MISMATCH_DETAILS: false
})
];
mix.webpackConfig({
devtool: 'inline-source-map',
plugins: plugins,
watchOptions: {
ignored: /node_modules/,
},
ignoreWarnings: [{
module: /esri-leaflet/,
message: /version/,
}],
resolve: {
alias: {
"@": path.resolve(__dirname, 'resources/src/js'),
"@core": path.resolve(__dirname, 'resources/_keenthemes/src'),
"@quotioo": path.resolve(__dirname, 'resources/quotioo'),
"vue-i18n": "vue-i18n/dist/vue-i18n.cjs.js",
extensions: [".*", ".wasm", ".mjs", ".jsx", ".json", ".ts", ".js", ".tsx", ".vue"]
}
},
module: {
rules: [
{
test: /.css$/i,
use: ["css-loader"],
exclude: [
path.resolve(__dirname, "node_modules"),
],
},
],
}
});
// Build Metronic CSS
mix
.options({
processCssUrls: false
})
.scripts(require('./resources/mix/plugins.js'), 'public/quotioo/js/plugins.bundle.js')
.scripts(require('./resources/mix/scripts.js'), 'public/quotioo/js/scripts.bundle.js')
.scripts(require('./resources/quotioo/js/scripts.js'), 'public/quotioo/js/app.scripts.bundle.js');
// Build custom 3rd party plugins
console.log('-- Build custom 3rd party plugins --');
(glob.sync(
resources/mix/vendors/!**!/!*.js
) || []).forEach(file => {mix.scripts(require('./' + file),
public/assets/${file.replace(path.normalize('resources/mix/vendors/'), 'plugins/custom/')}
);});
// JS pages (single page use)
console.log('-- JS pages (single page use) --');
(glob.sync(
resources/quotioo/js/custom/!**!/!*.js
) || []).forEach(file => {let output =
${file.replace(path.normalize(
quotioo/js/custom),
quotioo/js/custom).replace('resources', 'public')}
;mix.scripts(file, output);
});
// Custom app styles and javascript,
console.log('-- Custom app styles and javascript --');
mix.sass(
resources/_keenthemes/src/sass/style.scss
,public/quotioo/css/style.bundle.css
);mix.sass(
resources/quotioo/scss/style.scss
,public/quotioo/css/style.css
).sourceMaps(!mix.inProduction());
mix
.ts('resources/src/js/app.ts', 'public/app/js')
.vue({
version: 3,
})
.sourceMaps(!mix.inProduction())
.disableNotifications();
Steps To Reproduce:
The text was updated successfully, but these errors were encountered: