New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not supporting import
#3
Comments
I've got the same issue:
I've looked at the code of |
I also got this issue |
@stevenjob postLoaders could be used to avoid this issue
|
Can you give a reason why this is happening? |
@chemzqm answer is only useful in webpack 1, module : { |
webpack@2.x import(...) |
@chemzqm I've got the same issue and I tried
|
@chemzqm although use resolve: {
mainFields: ['browser', 'main']
} |
Guys, does it support webpack 4? |
For webpack 4, throws too many errors:
|
add |
Unfortunately does not work for me.
dataframe-js\lib\index.js - Line 1: webpack.config.js: var path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
// var es3ifyPlugin = require('es3ify-webpack-plugin');
module.exports = {
mode: 'development',
entry:{
lib:'./src/lib.js'
},
output:
{
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'var',
library: 'AppLib'
},
module:
{
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: [
[
'@babel/preset-env',
{
useBuiltIns: 'usage'
}
]
]
}
}
},
{
test: /\.js$/,
include: /node_modules/,
use: [
{
loader: 'babel-loader',
options: {
presets: [
[
'@babel/preset-env',
{
useBuiltIns: 'usage'
}
]
]
}
},
{
loader: 'es3ify'
}
]
}
]
},
plugins: [
new CopyPlugin([
path.resolve(__dirname + '/src/index.js'),
'appsscript.json',
'.clasp.json'
])
// ,
// new es3ifyPlugin()
],
resolve: {
mainFields: ['browser', 'main']
}
}; |
I became aware from webpack/webpack#2710 (comment) that this loader doesn't support
import
statements. Do you think it would be possible to either:import
'sOR
import
statements aren't supported so developers don't run into unexpected behaviorThank you for your work on this loader!!!!
The text was updated successfully, but these errors were encountered: