const { add, mul } = require('./js//mathUtils.js')
console.log(add(20, 30))
console.log(mul(20, 30))
import { name, age, height } from "./js/info"
console.log(name)
console.log(age)
console.log(height)
require('./css/normal.css')
require('./css/special.less')
webpack.config.js
const path = require('path')
module.exports = {
entry: './src/main.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bund.js'
},
module: {
rules: [{
test: /\.css$/,
use: ['style-loader', 'style-loader']
},
{
test: /\.less$/,
use: [{
loader: "style-loader"
}, {
loader: "css-loader"
}, {
loader: "less-loader"
}, ]
},
]
}
}