Comments (7)
This is relevant to #96
from object-fit-images.
PR: #106
from object-fit-images.
I never used it that way with webpack, what are you using? What’s your config?
from object-fit-images.
Did you try to use it like import objectFitImages from 'object-fit-images';
? Does it work for you?
My webpack.config
:
const path = require('path');
const webpack = require('webpack');
module.exports = {
devtool: 'inline-source-map',
mode: 'development',
entry: {
app: './entry.app.ts',
},
module: {
rules: [
{
test: /\.ts$/,
use: [
'ng-annotate-loader',
'ts-loader',
],
exclude: /node_modules/
},
{
test: /environments\\dev\.json$/,
use: [{
loader: 'ng-constants-json-loader',
options: {
moduleName: 'ems-config'
}
}],
type: "javascript/auto"
}
]
},
optimization: {
splitChunks: {
chunks: "all",
minSize: 30000,
minChunks: 1,
maxAsyncRequests: 5,
maxInitialRequests: 3,
automaticNameDelimiter: '~',
name: true,
cacheGroups: {
vendors: {
test: /[\\/]node_modules[\\/]/,
priority: -10,
name: "vendor"
},
default: {
minChunks: 2,
priority: -20,
reuseExistingChunk: true
}
}
}
},
output: {
chunkFilename: '[name].js',
filename: '[name].js',
path: path.resolve(__dirname, 'build/app')
},
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery",
"window.jQuery": "jquery"
}),
new webpack.ProvidePlugin({
Handsontable: "handsontable/dist/handsontable.full.js",
}),
new webpack.ContextReplacementPlugin(
// Workaround to avoid loading locales that are not used https://github.com/moment/moment/issues/2517
/moment[\/\\]locale$/,
/-----/ // Do not include any locales
)
],
resolve: {
extensions: ['.ts', '.js'],
modules: [path.resolve(__dirname, "src/"), "node_modules"]
}
};
from object-fit-images.
You’re using typescript, for whatever reason they have their own incompatible import syntax.
from object-fit-images.
https://blog.jdriven.com/2017/06/typescript-and-es6-import-syntax/
from object-fit-images.
Hm, that's weird, but if you don't think it should be in the package documentation - ok
from object-fit-images.
Related Issues (20)
- Assignment to read-only properties is not allowed in strict mode HOT 2
- Load event handler should get called when backgroundImage style is rendered. HOT 1
- Changing the src results in a "data-ofi-undefined" attribute. HOT 1
- Media Query images using `<source>` tag not working HOT 2
- Assignment to read-only properties is not allowed in strict mode HOT 13
- How to use this in angular project? HOT 2
- Error during tests HOT 2
- Test in IE with version 3.2.4 HOT 1
- IE11: Including the polyfill in two different libraries via ES6 imports then including both onto the page breaks it HOT 2
- > Assignment to read-only properties is not allowed in strict mode
- Doesn't support Edge 15 HOT 1
- react how to use ,ie11 is not working? HOT 1
- cloudinary videos is not working in IE 11 i.e object fit HOT 1
- Unable to use with Next HOT 2
- A request to have a de-initialization (cleanup) API HOT 2
- IE renders the svg object in background-image property HOT 10
- Uncaught (in promise) TypeError: _objectFitImages2.default.objectFitImages is not a function HOT 1
- Uses src when image has srcset HOT 4
- <picture> element in Edge HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from object-fit-images.