File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,21 @@ const path = require("path");
2
2
const webpack = require ( "../../../../" ) ;
3
3
/** @type {function(any, any): import("../../../../").Configuration[] } */
4
4
module . exports = ( env , { testPath } ) => [
5
+ {
6
+ output : {
7
+ filename : "esm.js" ,
8
+ libraryTarget : "module"
9
+ } ,
10
+ target : "node14" ,
11
+ resolve : {
12
+ alias : {
13
+ external : "./non-external"
14
+ }
15
+ } ,
16
+ experiments : {
17
+ outputModule : true
18
+ }
19
+ } ,
5
20
{
6
21
output : {
7
22
filename : "commonjs.js" ,
Original file line number Diff line number Diff line change @@ -2,6 +2,18 @@ var webpack = require("../../../../");
2
2
var path = require ( "path" ) ;
3
3
/** @type {function(any, any): import("../../../../").Configuration[] } */
4
4
module . exports = ( env , { testPath } ) => [
5
+ {
6
+ resolve : {
7
+ alias : {
8
+ library : path . resolve ( testPath , "../0-create-library/esm.js" )
9
+ }
10
+ } ,
11
+ plugins : [
12
+ new webpack . DefinePlugin ( {
13
+ NAME : JSON . stringify ( "esm" )
14
+ } )
15
+ ]
16
+ } ,
5
17
{
6
18
resolve : {
7
19
alias : {
You can’t perform that action at this time.
0 commit comments