我使用 Webpack 来合并 javascript 文件。但我不明白如何合并像 javascript 这样的 css 文件
var webpack=require('webpack');
module.exports = {
context: __dirname ,
entry: {one:["./script/born.js","./script/create_game.js"], two:["./css/destop.css", "./css/main_page.css"]},
output: {
path: __dirname,
filename: "/production/[name].js"
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
Run Code Online (Sandbox Code Playgroud)
有可能做这样的事情吗?
在创建类和使用类方法之后,我只想在onсe上调用构造函数.我如何在JavaScript中执行此操作?谢谢!
var Test=function(){
//hello(); // why not working? How call?
}
Test.prototype.hello=function(){
console.log(1);
}
var t=new Test();
t.hello()
Run Code Online (Sandbox Code Playgroud)