I have this code in application.js
require("turbolinks").start()
require("@rails/activestorage").start()
require("channels")
require("jquery")
import start from './games/chatcher'
console.log(1)
export {
start
}
but i don't get any output in console
Why?
Edit:
my webpacker related lines in package.json
{
"@rails/webpacker": "^6.0.0-beta.2",
"turbolinks": "^5.2.0",
"webpack": "^5.11.0",
"webpacker-cli": "^2.2.1"
},
"version": "0.1.0",
"devDependencies": {
"@webpack-cli/serve": "^1.2.1",
"webpack-cli": "^4.2.0",
"webpack-dev-server": "^3.11.2"
},
}
and my Gemfile
gem 'webpacker', '~> 6.x'
I assume that it could be because I updated webpacker and probably some versions don't work correct.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…