brycehq / es3ify-webpack-plugin Goto Github PK
View Code? Open in Web Editor NEWA simple webpack plugin to es3ify your code for old versions of ie, such as ie8.
A simple webpack plugin to es3ify your code for old versions of ie, such as ie8.
I still get Object,defineProperty in the output of my webpack bundle. Was this plugin designed to fix that? If not, what does this plugin accomplish as the code output by Webpack is still not runnable in IE8?
Plugin did helped but it doesn't handle getters and setters for example
SomeFunction.prototype = { get promise() { return this.promise; } }
UglifyJsPlugin=new webpack.optimize.UglifyJsPlugin
if(UglifyJsPlugin)
{
if(UglifyJsPlugin.sourceMap==true){
throw 'error'
}else{
console.log('Webpack normal for pack')
}
}
ERROR in ./js/vendor.823775742b2101a960ae.js from es3ify
TypeError: Cannot read property 'sections' of null
I have a webpack configuration with ExtractTextPlugin:
var ES3ifyPlugin = require('es3ify-webpack-plugin');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
entry: {
builder: './src/builder.jsx'
},
output: {
path: '.',
filename: './[name].js',
chunkFilename: '[id].js',
libraryTarget: 'amd'
},
resolve: {
extensions: ['', '.js', '.jsx']
},
module: {
loaders: [
{test: /\.(woff|woff2|ttf|eot|svg)$/, loader: 'file?name=fonts/[name].[ext]'},
{test: /\.less$/, loader: ExtractTextPlugin.extract('style', 'css!less')},
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel',
query: {
presets: ['es2015', 'react'],
plugins: [
'transform-export-extensions',
'transform-object-rest-spread',
'transform-es3-property-literals',
'transform-es3-member-expression-literals'
]
}
}
]
},
plugins: [
new ExtractTextPlugin("[name].css"),
new ES3ifyPlugin({test: /\.jsx?$/})
]
};
But you plugin tries to transform CSS files.
I found out that your plugin could receive test
option with regex, and default value is /\.js($|\?)/i
, but this regexp isn't used in code.
I tried this plugin in webpack 4.x,but nothing helped....
Thank you for releasing this. Would you mind setting a package version other than 0.0.0? Preferably follow semver and start with 1.0.0. I can put a PR in if you would like.
Thoughts?
Hi,
Maybe you have a special use-case, but es3ify can transform files in node_modules, you just need to configure it correctly. Is it possible that you have an 'exclude' condition that prevents the loader from transforming files in the node_modules directory?
Here is an example:
module: {
loaders: [{
// Here, webpack is instructed to EXCLUDE the node_modules directory
test: /\.js$/,
exclude: /\/node_modules\//,
loader: 'babel-loader'
query: {
presets: ['es2015'],
}
}, {
// Here you instruct webpack to use the es3ify loader for the node_modules directory
test: /\.js$/,
include: /\/node_modules\//,
loader: 'es3ify'
}]
}
Was looking for a solution for the same problem when I saw your plugin, if you needed the plugin for other reasons then please ignore this :)
Using this plug-in, the webpack packaging is so slow that the memory leaks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.