1234567891011121314151617181920212223242526272829 |
- const path = require('path');
- const webpack = require('webpack');
- module.exports = {
- mode: "development",
- entry: './target/index.js',
- output: {
- path: path.resolve(__dirname, 'static/js/libs'),
- filename: 'bundle.js',
- clean: true,
- },
- module: {
- rules: [
- {
- // docs: https://webpack.js.org/configuration/module/#resolvefullyspecified
- test: /\.m?js/,
- resolve: {
- fullySpecified: false,
- }
- }
- ]
- },
- plugins: [
- // fix "process is not defined" error:
- new webpack.ProvidePlugin({
- process: 'process/browser',
- }),
- ],
- };
|