0
我確實在全球安裝了暴亂和騷亂。我已經從命令行測試了兩者。事實上,我有另一個項目,暴動正在觀看和正常編譯。未找到模塊(防暴),但riotjs已安裝並正在工作
這是一個的WebPack設置,這是錯誤:
ERROR in ./src/index.js
Module not found: Error: Can't resolve 'riot' in
'c:\Users\...\www\riot\src'
@ ./src/index.js 3:11-26
@ multi (webpack)-dev-server/client?http... ./src/index.js
ERROR in ./src/index.js
Module not found: Error: Can't resolve '.tags/sample-output.tag' in 'c:\Users\...\www\riot\src'
@ ./src/index.js 4:0-34
@ multi (webpack)-dev-server/client?http... ./src/index.js
webpack: Failed to compile.
這裏是索引文件:
var riot = require('riot')
require('.tags/sample-output.tag')
document.addEventlistner('DOMContentLoaded', function(){
riot.mount('sample-output')
})
這裏是webpack.config
var path = require('path')
module.exports = {
entry: './src/index.js',
output:{
path:__dirname,
filename:'bundle.js'
},
module:{
loaders:[
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
query:{
presets:['es2015']
}
},
{
test: /\.tag$/,
loader: 'tag',
exclude: /node_modules/
}
]
}
}
注意,我們不使用[解決]標題設備在這裏 - 點擊相鄰的,而不是你的首選答案刻度線。謝謝。 – halfer