File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
packages/smooth/src/build Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,9 @@ function getPluginFileContent(config) {
15
15
. filter ( plugin => plugin . browser )
16
16
. map ( ( plugin , index ) => {
17
17
const file = path . join ( plugin . resolve , 'smooth-browser' )
18
- return `{ plugin: '${ file } ', options: ${ JSON . stringify ( plugin . options ) } }`
18
+ return `{ plugin: require('${ file } '), options: ${ JSON . stringify (
19
+ plugin . options ,
20
+ ) } }`
19
21
} )
20
22
21
23
return `module.exports = [${ definitions . join ( ',\n' ) } ]`
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ describe('#buildBrowser', () => {
36
36
const [ [ filename , content ] ] = cache . writeCacheFile . mock . calls
37
37
expect ( filename ) . toBe ( 'browser-plugins.js' )
38
38
expect ( content ) . toBe (
39
- 'module.exports = [{ plugin: \'/a/smooth-browser\', options: {"foo":"bar"} }]' ,
39
+ 'module.exports = [{ plugin: require( \'/a/smooth-browser\') , options: {"foo":"bar"} }]' ,
40
40
)
41
41
} )
42
42
} )
You can’t perform that action at this time.
0 commit comments