html-webpack-plugin,从插件源码中看,模板中可以支持的变量有:
var templateVariables = [
'compilation',
'webpack',
'webpackConfig',
'htmlWebpackPlugin'
];
此处小白的我把htmlWebpackPlugin变量误解为webpack.config.json中的变量定义了~~
var templateVariables = [
'compilation',
'webpack',
'webpackConfig',
'htmlWebpackPlugin'
];
此处小白的我把htmlWebpackPlugin变量误解为webpack.config.json中的变量定义了~~
2017-07-07
babel-loader官网表示 { "presets": ["latest"] } === { "presets": ["env"] }
2017-07-07
已采纳回答 / AAA认证老张
npm install --save:会把msbuild包安装到node_modules目录中会在package.json的dependencies属性下添加msbuild之后运行npm install命令时,会自动安装msbuild到node_modules目录中之后运行npm install --production或者注明NODE_ENV变量值为production时,会自动安装msbuild到node_modules目录中npm install --save-dev:会把msbuild包安装到no...
2017-07-05
webpack3.0写的
const path = require('path');
module.exports = {
//webpack打包入口
entry: './src/script/main.js',
//打包文件放的位置
output: {
path: path.resolve(__dirname, "/dist/js"),
filename: 'bundle.js'
}
}
const path = require('path');
module.exports = {
//webpack打包入口
entry: './src/script/main.js',
//打包文件放的位置
output: {
path: path.resolve(__dirname, "/dist/js"),
filename: 'bundle.js'
}
}
2017-07-05