Answer the question
In order to leave comments, you need to log in
Why doesn't webpack import node_modules?
webpack.config.js
const path = require('path')
module.exports = {
resolve: {
alias: {
'node_modules': path.join(__dirname, 'node_modules'),
}
},
output: {
filename: 'index.min.js',
},
module: {
rules: [
{
test: /\.js$/,
// exclude: /(node_modules)/,
loader: 'babel-loader',
},
],
},
};
//Import sources
import "jquery";
import '@popperjs/core'
import 'bootstrap'
import 'slick-carousel'
import 'regenerator-runtime'
import 'three'
Answer the question
In order to leave comments, you need to log in
It imports everything, you just don't understand how the modules work:
https://developer.mozilla.org/ru/docs/Web/JavaScri...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question