mirror of
https://github.com/liabru/matter-js.git
synced 2025-01-08 15:38:03 -05:00
fix dev server externals
This commit is contained in:
parent
b5326f8e49
commit
1f2f9fec45
1 changed files with 29 additions and 15 deletions
|
@ -26,7 +26,16 @@ License ${pkg.license}${!minimize ? '\n\n' + license : ''}`;
|
||||||
|
|
||||||
const entry = isDevServer ? './demo/js/Server.js' : './src/module/main.js';
|
const entry = isDevServer ? './demo/js/Server.js' : './src/module/main.js';
|
||||||
|
|
||||||
const externals = isDevServer ? undefined : {
|
const externals = isDevServer ?
|
||||||
|
{
|
||||||
|
'matter-js': {
|
||||||
|
commonjs: 'matter-js',
|
||||||
|
commonjs2: 'matter-js',
|
||||||
|
amd: 'matter-js',
|
||||||
|
root: 'Matter'
|
||||||
|
}
|
||||||
|
} :
|
||||||
|
{
|
||||||
'poly-decomp': {
|
'poly-decomp': {
|
||||||
commonjs: 'poly-decomp',
|
commonjs: 'poly-decomp',
|
||||||
commonjs2: 'poly-decomp',
|
commonjs2: 'poly-decomp',
|
||||||
|
@ -69,7 +78,8 @@ License ${pkg.license}${!minimize ? '\n\n' + license : ''}`;
|
||||||
path.resolve(__dirname, './demo'),
|
path.resolve(__dirname, './demo'),
|
||||||
path.resolve(__dirname, './examples'),
|
path.resolve(__dirname, './examples'),
|
||||||
path.resolve(__dirname, './node_modules/matter-tools/build'),
|
path.resolve(__dirname, './node_modules/matter-tools/build'),
|
||||||
path.resolve(__dirname, './node_modules/pathseg')
|
path.resolve(__dirname, './node_modules/pathseg'),
|
||||||
|
path.resolve(__dirname, './node_modules/matter-wrap/build')
|
||||||
],
|
],
|
||||||
watchContentBase: true,
|
watchContentBase: true,
|
||||||
open: true,
|
open: true,
|
||||||
|
@ -101,6 +111,10 @@ License ${pkg.license}${!minimize ? '\n\n' + license : ''}`;
|
||||||
'/lib/pathseg.js': {
|
'/lib/pathseg.js': {
|
||||||
target: 'http://localhost:8000/',
|
target: 'http://localhost:8000/',
|
||||||
pathRewrite: { '^/lib/pathseg.js' : '/pathseg.js' }
|
pathRewrite: { '^/lib/pathseg.js' : '/pathseg.js' }
|
||||||
|
},
|
||||||
|
'/lib/matter-wrap.js': {
|
||||||
|
target: 'http://localhost:8000/',
|
||||||
|
pathRewrite: { '^/lib/matter-wrap.js' : '/matter-wrap.js' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue