hide-jquery-loader
v3.0.0
Published
simplest way to protect your angular widget from unpredictable legacy
Downloads
3
Readme
hide-jquery-loader
Simplest way to protect your [email protected] widget from unpredictable legacy.
For example:
- jqLite:
anguler.element('<div class="foo"'/>).removeClass().hasClass('foo') === true
- [email protected]:
anguler.element('<div class="foo"'/>).removeClass().hasClass('foo') === false
yarn -D hide-jquery-loader
part of webpack.config.js
const { sync: moduleResolve } = require('resolve')
const { resolve: pathResolve } = require('path')
const widgetResolve = (...p) => pathResolve(__dirname, 'widget/project/dir', ...p)
const widgetModule = (name) => moduleResolve(name, { basedir: widgetResolve() })
module.exports = {
module: {
loaders: [{
include: [
widgetModule('angular')
],
loader: 'hide-jquery-loader'
}]
}
}