Last active
August 26, 2022 05:26
-
-
Save yokotaso/635ed0fddc22057e82e340e352849198 to your computer and use it in GitHub Desktop.
webpack.config.js with babel, polyfill
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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