Почему webpack не импортирует node_modules?

webpack.config.js

const path = require('path')
module.exports = {
resolve: {
    // alias: {
    //     'node_modules': path.join(, 'node_modules'),
    // }
    alias: {
        'node_modules': path.resolve(__dirname, 'node_modules')
    }
},
output: {
    filename: 'index.min.js',
},
module: {
    rules: [
        {
            test: /\.js$/,
            // exclude: /(node_modules)/,
            loader: 'babel-loader',
        },
    ],
},

};

index.js

import "jquery";
import '@popperjs/core'
import 'bootstrap'
import 'slick-carousel'
import 'regenerator-runtime'
import 'three'

Ни в какую не импортирует модули из node modules. Работает в связке с галпом, поэтому нет entry.Из других файлов все хорошо импортирует. В чем проблема ?


Ответы (0 шт):