I upgraded babel 6.x ? 7.x but having issues running Webpack.
It is complaining about missing core-js/modules/*.
My babel.config.js is in the root directory. I converted the previously existing .babelrc to js (.babelrc also produced the same errors). I am guessing it is some collision with all the core, corejs2, runtime stuff.
There are two apps in my src, mine and Styleguidist (in ./node_modules). My app transpiles and works with these same package.json/babel.config, but …
我在本地运行Weblogic 10.3,并对它生成的sessionId有疑问.当我打印session.getId()时,我看到类似于此的东西:
BBp9TAACMTglQ2TDFAKR4tpyXg73LZDQJ2PtT9x8htG1tWY122aa!869187422!1308677666322
这些惊叹号及其后面是什么,特别是第二对:!1308677666322?看起来有时服务器会附加它,有时却不会.我相信如果我使用相同的浏览器第二次登录我的应用程序,weblogic会附加它.这个cookie是否以某种方式相关?
需要一些提供OpaqueToken的帮助.使用Angular 2 beta-12.如果提供者密钥是字符串,它可以正常工作,但在使用OpaqueToken时不起作用.在Child类中,SF未定义.
家长班:
export let SF = new OpaqueToken('sf');
export class A {
testMsg: string = 'hello';
}
@Component({
template: `<child></child>`,
providers: [
provide(SF, {useValue: A}),
provide('justString', {useValue: 'hi'})
]
})
export class App {}
Run Code Online (Sandbox Code Playgroud)
儿童班:
import {Component, Injector, Inject, OpaqueToken} from 'angular2/core'
import {SF, A} from './app'
console.log("******", SF); // undefined
@Component({
selector: 'child',
template: `
$$CHILD Rendered$$ {{a}}
`
})
export class Child {
//constructor(@Inject(SF) private a: A) {} // doesn't work
constructor(@Inject('justString') private a: string) {} …Run Code Online (Sandbox Code Playgroud) 我想将一些常用代码捆绑为CommonJS模块,然后使用来自不同捆绑包和/或直接来自全局的常用模块.
entry1-common.js
-- a.js
-- b.js
entry2-app.js
-- x.js
inside i would like to to access entry1-common's a.js here
var moduleA = require('./a.js');
<script>
// i would also like to access modules from outside
var moduleA = require('./a.js');
var moduleX = require('./x.js');
</script>
Run Code Online (Sandbox Code Playgroud)
我正在使用gulp.一些浏览器选项似乎是我需要的但不能让我在那里:
browserify(bundleConfigs: [{
entries: './entry1-common.js',
dest: dest,
outputName: 'common.js',
hasExports: true, // this gives me require() function on the outside
require: ['jquery']
}])
Run Code Online (Sandbox Code Playgroud)
我需要捆绑"通过"和"双工器"吗?我在browserify文档中看过这个例子.
我可以在我的gulp任务中创建两个单独的包,但我不知道如何从一个访问模块到另一个.
如何编写 Vue 2.x 指令以检测模型中的更改?我只能绑定到元素并检测输入、按键等。但是我无法检测模型何时更新。这是否超出了 Vue 指令的范围?
Vue.directive('text-validation', {
bind: function (el, binding, vnode) {
el.addEventListener('input', function(){
console.log('only gets called on input, not model updates');
});
}
});
new Vue({
el: '#app',
data: {
text: 'testing...'
},
mounted: function() {
setTimeout(function(){
this.text = 'detected change';
}.bind(this), 2000)
}
}) Run Code Online (Sandbox Code Playgroud)
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.9/vue.js"></script>
<div id="app">
<input v-model="text" v-text-validation=""/>
</div>Run Code Online (Sandbox Code Playgroud)
有没有办法在 SASS 文件的 webpack 处理后保留我的原始图像/目录结构。我不想散列图像或内联它们。我希望 URL() 看起来与它们完全一样,相对于 sass 文件,如下所示:../images/*
原始 SCSS:
background: url(../images/icon.gif);
Run Code Online (Sandbox Code Playgroud)
网络包配置:
{ test: /\.css$/, loader: 'raw-loader' },
{ test: /\.scss$/, loader: ExtractTextPlugin.extract('css!resolve-url!sass?sourceMap') },
{ test: /\.(png|gif|bmp)$/, loader: "file-loader", query: "name=[path][name].[ext]" }
can anything be done here ^^^^^ to make it original path
Run Code Online (Sandbox Code Playgroud)
输出:
background:url(src/images/icons/icon.gif)
Run Code Online (Sandbox Code Playgroud) 我正在运行一些性能测试,看看我是否可以直接使用jQuery而不是Ext的包装器.首先,我想将jQuery(#id)与doc.getElementById进行比较,但我必须做错事,因为jQuery(#id)的速度要慢得多.
var searchDoc = searchWin.document;
var jqSearchDoc = jQuery(searchWin.document);
for (var i=0; i<500; i++){
var temp = jqSearchDoc.find('#myID'); //takes 1100ms
//var temp = jQuery(searchDoc.getElementById('myID')); //takes 3ms
}
Run Code Online (Sandbox Code Playgroud)
知道为什么未注释的行速度会慢得多吗?以及如何重写它?
angular ×1
babel-loader ×1
babeljs ×1
browserify ×1
commonjs ×1
gulp ×1
jquery ×1
jsessionid ×1
npm ×1
performance ×1
sessionid ×1
vue.js ×1
vuejs2 ×1
weblogic ×1
webpack ×1
webpack-4 ×1