Skip to content

Instantly share code, notes, and snippets.

@yokotaso
Last active August 26, 2022 05:26
Show Gist options
  • Save yokotaso/635ed0fddc22057e82e340e352849198 to your computer and use it in GitHub Desktop.
Save yokotaso/635ed0fddc22057e82e340e352849198 to your computer and use it in GitHub Desktop.
webpack.config.js with babel, polyfill
const path = require('path');
module.exports = {
mode: "development",
entry: {
'polyfill': '@babel/polyfill',
'kintone-create-edit-show': './src/kintone-create-edit-show.js'
},
module: {
rules: [
{
test: /\.m?js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: [
[
"@babel/preset-env",
]
]
}
}
}
]
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].js'
},
externals: {
jquery: 'jQuery'
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment