webpack/test/configCases/library/1-systemjs-external-esm/webpack.config.js

25 lines
544 B
JavaScript
Raw Normal View History

"use strict";
const path = require("path");
const webpack = require("../../../../");
/** @type {(env: Env, options: TestOptions) => import("../../../../").Configuration[]} */
module.exports = (env, { testPath }) => [
{
entry: "./system-external-esm.js",
output: {
library: {
type: "system"
}
},
externals: {
"library-esm": path.resolve(testPath, "../0-create-library/system-esm.js")
},
plugins: [
new webpack.DefinePlugin({
NAME: JSON.stringify("systemjs with external from ES module format")
})
]
}
];