webpack承载捆绑文件的位置。窗户
运行应用程序后,Web包将创建一个bundle.js并将其上的引用添加到html中。但是捆绑文件的物理位置在哪里 配置webpack承载捆绑文件的位置。窗户,webpack,webpack-dev-server,Webpack,Webpack Dev Server,运行应用程序后,Web包将创建一个bundle.js并将其上的引用添加到html中。但是捆绑文件的物理位置在哪里 配置 const path = require('path'); var webpack = require("webpack"); const config = { entry: [ './index.js', ], module: { rules: [ { test: /\.css$/, use:[ '
const path = require('path');
var webpack = require("webpack");
const config = {
entry: [
'./index.js',
],
module: {
rules: [
{
test: /\.css$/,
use:[ 'css-loader' ],
exclude: /node_modules/
},
{
test: /\.(js|jsx)$/,
loaders: [
'babel-loader',
],
exclude: /node_modules/
},
{
test: /[\/\\]node_modules[\/\\]some-module[\/\\]index\.js$/,
loader: "imports-loader?define=>false"
}
],
},
resolve: {
extensions: ['.css', '.js', '.jsx'],
alias: { jquery: 'jquery/src/jquery' }
},
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery'
})
]
};
module.exports = config;
谢谢你的帮助
但是捆绑文件的物理位置在哪里
与
webpack dev server
一起使用时,webpack将捆绑包存储到内存中的文件系统中。一切都发生在内存中。当你说:“当我运行webpack时”,你的意思是webpack开发服务器?@MatheusSilva是的,我使用的是webpack开发服务器。