...
 
Commits (2)
module.exports = options => {
let code = options.userScript
code = code ? `export { default } from '${code}'` : '/* no user script provided */'
let code
let userScript = options.userScript
if (userScript) {
// double escape backward slashes for windows
userScript = userScript.replace(/\\/g, '\\\\')
code = `export { default } from '${userScript}'`
} else {
code = '/* no user script provided */'
}
return { code }
}
......@@ -19,8 +19,6 @@ function buildConfig(options, projectDir, outputDir) {
// general
config.mode(isProduction ? 'production' : 'development')
config.target('web')
config.node
.set('fs', 'empty')
// entry scripts
config
......@@ -79,7 +77,7 @@ function buildConfig(options, projectDir, outputDir) {
config.module
.rule('dynamic-injection')
.test(/injectors\/.+\.js$/)
.test(/injectors[\/\\].+\.js$/)
.use('val-loader')
.loader('val-loader')
.options({
......@@ -108,7 +106,7 @@ function buildConfig(options, projectDir, outputDir) {
.add(path.resolve(projectDir, 'node_modules/'))
// core courses fixes
if (projectDir.includes('salp/courses/salp-course')) {
if (projectDir.includes(path.join('salp', 'courses', 'salp-course'))) {
config.plugin('copy-package-info')
.use(CopyWebpackPlugin, [[
{
......