Javascript 网页包html加载程序
我使用webpack,我想使用jade,目前我使用的是jade html laoder,但当我运行webpack watch命令时,html文件的结果包含所有嵌入的javascript代码 这是我的webpack.config.jsJavascript 网页包html加载程序,javascript,pug,webpack,Javascript,Pug,Webpack,我使用webpack,我想使用jade,目前我使用的是jade html laoder,但当我运行webpack watch命令时,html文件的结果包含所有嵌入的javascript代码 这是我的webpack.config.js var webpack = require('webpack'), BrowserSyncPlugin = require('browser-sync-webpack-plugin'), html = require('jade-html-loade
var webpack = require('webpack'),
BrowserSyncPlugin = require('browser-sync-webpack-plugin'),
html = require('jade-html-loader'),
path = require('path');
require('es6-promise').polyfill();
module.exports = {
entry: ['./js/scripts.js', 'file?name=index.html!jade-html!./index.jade'],
output: {filename: './js/bundle.js'},
module: {
loaders: [{
test: /\.js?/,
loader: 'babel-loader',
exclude: /node_modules/
},
{
test: /\.jade$/,
loader: 'jade'
},
{
test: /\.css$/,
loader: "style!css"
},
{
test: /\.scss$/,
loaders: ["style", "css", "sass"]
}]
},
plugins: [
new BrowserSyncPlugin({
host: 'localhost',
port: 3000,
server: {baseDir: './'},
reload: true,
files: "*.html"
})
]
};
你试过使用新版本吗? 玉现在被称为帕格 惠斯为我工作:
module: {
loaders: [
{
test: /\.jade$/,
loader: 'pug-html-loader'
}
]
}
你试过使用新版本吗? 玉现在被称为帕格 惠斯为我工作:
module: {
loaders: [
{
test: /\.jade$/,
loader: 'pug-html-loader'
}
]
}