Aurelia CLI to create parent folder

I am trying to get build (index.html and scripts) to output to a folder one level above the project root. In my case something like .. / dist /

The goal is to group assembly files and separate them from src files.

I have been playing around with baseDir, baseUrl, index and pins in Aurelia.json, but while script compilation works (scripts output to their intended location) index.html is not updated with the last rev filename.

Thanks in advance.

+3


source to share


1 answer


Not sure if this was fixed in the docs, but in aurelia_project / aurelia.json I use:

"platform": {
"id": "aspnetcore",
"displayName": "ASP.NET Core",
"port": 8080,
"hmr": false,
"open": false,
"output": "wwwroot/dist/"  },

      

Then "output" is used in webpack.config.js



const project = require('./aurelia_project/aurelia.json');
const outDir = path.resolve(__dirname, project.platform.output);

      

And in module.exports

 output: {
path: outDir,
publicPath: baseUrl,
filename:  '[name].bundle.js',
sourceMapFilename: '[name].bundle.map',
chunkFilename: '[name].chunk.js'
},
 devServer: {
contentBase: outDir,
// serve index.html for all 404 (required for push-state)
historyApiFallback: true
},

      

0


source







All Articles